4 ms·
> Tree-like heirarchy of dune files confused me since it wasn't really explained anywhere. It's explained in project layout [1]. And it's not a tree like, it'
by ernst_klim 7y ago
> Tree-like heirarchy of dune files confused me since it wasn't really explained anywhere.
It's explained in project layout [1]. And it's not a tree like, it's basically flat, since it doesn't matter how deep in the file system your dune file is buried.
It's like `meson` in its concept.
> Does `dune` handle dependencies
It doesn't, and so neither do `meson`, `cmake` and most other build systems. As you may want to use various ways of installing dependencies: native packages, manual compilation, opam, esy.
> Can I load an interactive shell with the definitions?
Yes, you can run `dune utop ./path`
> If you look at other projects, you'll see they use opam files differently from one another.
Dune is independent of opam, opam file is needed to publish your package to opam. You can specify packages with dune without creating an opam file, see [2]
> I tried `opam install --deps-only`, but it complained sometimes about the state of uncommitted files.
If you use opam, you can do `opam install --deps-only`, or `dune build @install`, which would suggest a command to install missing packages.
[1] https://dune.readthedocs.io/en/stable/overview.html#project-layout https://dune.readthedocs.io/en/stable/overview.html#project-...
[2] https://dune.readthedocs.io/en/stable/concepts.html#package-specification https://dune.readthedocs.io/en/stable/concepts.html#package-...