Stream: Dune devs & users

Topic: Updating dune in Debian


view this post on Zulip Julien Puydt (Jul 03 2023 at 16:38):

Hi,

now that Debian released a stable versions, its OCaml team (I'm a member) is starting to update OCaml-related packages, and that includes dune. I just tried dune 3.8.2 (not the latest, I know), but I have a strange issue after building the package: when I try "dune build" in some directory, dune tells me it's entering my /home/jpuydt directory and tries to do something with everything I have under my home!

Why doesn't it use the current dir? Where did I do something wrong?

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 16:49):

Hi @Julien Puydt , this is a kind of Dune FAQ / pain point

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 16:49):

Dune tries to detect the root of the workspace by looking up in parent directories, so I guess you have a dune-project file in your $HOME

view this post on Zulip Julien Puydt (Jul 03 2023 at 16:52):

/me wonders how he ended up with a ~/dune-project...

view this post on Zulip Julien Puydt (Jul 03 2023 at 16:53):

dune doesn't use the one in the current directory if it finds one somewhere above?

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 18:05):

It does not unless you pass --root

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 18:05):

This is an open problem how to better handle this

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 18:06):

The original design was due to the will to have this work setup work:

But indeed, Dune devs are trying to improve this problem without breaking some use cases too much

view this post on Zulip Emilio Jesús Gallego Arias (Jul 03 2023 at 18:42):

https://dune.readthedocs.io/en/stable/usage.html#finding-the-root


Last updated: Oct 13 2024 at 01:02 UTC