Plan for Dune 3.0

Nope, but seems worth discussing this point. i.e. should dune do something if it finds no dune-project or dune-workspace file? I’m adding this to the agenda of the next Dune meeting.

I just chat it with a lab member and he also has also this concern.

Another concern is I cannot use ^C or ^D to cancel when dune starts scanning after I realize it’s at a wrong path.

$ code> dune build                                                                                       15:26:46
Info: Creating file dune-project with this contents:
| (lang dune 2.8)
Scanned 600 directories ...

I also had tried directory-based way e.g. direnv or alias dune with a script to check the path though none of them looks very good to me…

1 Like

Indeed. We should insert checkpoint to check for signals during the initial scan. Could you open a ticket about that so that we remember to do it? In any case, if you press ^C several times quickly, Dune will abort. It’s not a clean exit, but at least it does the job. Dune prints a message when it exits this way.

Here is the ticket on the dune project.

I just learn here (and tried) that hitting ^C several times can perform an emergency exit. I still need to delete the dune-project and _build in the path which is not intended to run dune build, so I also mention this in the ticket. I don’t know what are the convention or usual behaviors of a program performing ^C signal handling besides exiting soon.

2 Likes

relying on the findlib configuration file I’m relying on findlib.conf to cross compile packages on esy, currently esy just sets the OCAMLPATH but we intended to move esy to findlib.conf, as it seems like a better way to setup the environment and it reduces the size of the environment.

I believe @anmonteiro is also using the same for cross compiling on nix.

@EduardoRFS ack. Actually, Dune does the same for cross-compilation. More precisely, when compiling with -x <target>, or when setting up cross compilation via the dune-workspace file, it reads the corresponding findlib.conf file installed by the OCaml cross-toolchains and cross-packages · GitHub opam repositories.

So it wouldn’t be too difficult to change Dune so that it always read the findlib configuration file. However, there is on-going work to add support for OCAMLPATH in the compiler and eventually deprecate ocamlfind. So moving from using OCAMLPATH to using findlib.conf feels like going backward.

@EduardoRFS see in particular this comment. Defining standard OCaml development lifecycle processes - #15 by dbuenzli

10 posts were split to a new topic: OCaml RFC#17: library linking proposal