Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 534

Help with cryptic dependency cycle compile errors using `dune build`

$
0
0

Hi all,
I am working on writing a library for large chunked & compressed multidimensional arrays. I was working on a adding a feature to support sharding of array “chunks”. The way this works is that sharding further splits array chunks into sub-chunks that can be stored in a single “shard”. These sub-chunks have a set of codecs that are applied to them to compress them before storing them in a shard. The way the sharding process is defined requires one to implement the functionality in a recursive manner: see here. This image kind of illustrates what is required .

I tried to implement this feature using recursive modules here: ... · zoj613/zarr-ml@9cd411d · GitHub but this failed to compile due to cyclic dependencies. I tried to debug but came up short. So as a second attempt I removed the recursive module definitions and relied on mutually recursive functions instead: see: Blaming zarr-ml/lib/codecs/array_to_bytes.ml at 1176628bd4f48c1aad5b06b2c74472ce9de49800 · zoj613/zarr-ml · GitHub , but this too wouldn’t compile due to some cyclic dependencies. I am still not able to pinpoint where this occurs given the error message

$ dune build
Error: dependency cycle between modules in _build/default/lib:
   Storage
-> Array_to_bytes
-> Array_to_bytes
-> required by _build/default/lib/zarr.a
-> required by alias lib/all
-> required by alias default

I spoke to @shonfeder and they recommended I open a github issue on the dune project since it is not clear why I keep getting this compile error; but I wanted to read what others think before I do.

9 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 534

Trending Articles