Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Even lazier load of context #10399

Open
samoht opened this issue Apr 6, 2024 · 0 comments
Open

Even lazier load of context #10399

samoht opened this issue Apr 6, 2024 · 0 comments

Comments

@samoht
Copy link
Member

samoht commented Apr 6, 2024

It seems that in Dune 3.8.0, the loading of all context is done more lazily than before (which is good!). I don't see any entry in the changelog, so I'm checking if this was expected and won't change in the future. i.e. with an empty project dune + ocamlfind installed, and with just one dune-workspace file that contains the following:

(lang dune 2.9)
(context (default))
(context (default (name solo5)  (host default)  (toolchain solo5)))

I got:

$ opam install ocamlfind dune.3.7.0 -y
[...]
$ dune b ; echo $?
Error: ocamlfind toolchain solo5 isn't defined in
/Users/samoht/trucs/crash/4/_opam/lib/findlib.conf.d (context: solo5
1

while:

$ opam install ocamlfind dune.3.8.0 -y
[...]
$ dune b; echo $?
0

Also, as the context seems to be loaded lazily, could we go one step further and not require ocamlfind at all if that x-compiler context is not used? i.e. right now, Dune will fail with the following:

$ opam remove ocamlfind
[...]
$ dune b; echo $?
Error: Could not find `ocamlfind' in PATH or an environment variable
`OCAMLFIND_CONF' while cross-compiling with toolchain `solo5'
Hint:
- `opam install ocamlfind' and/or:
- Point `OCAMLFIND_CONF' to the findlib configuration that defines this
  toolchain
1

Do you think we could lift that restriction so we don't need ocamlfind at all until we actually want to x-compile?

@samoht samoht changed the title Even lazies load of context Even lazier load of context Apr 6, 2024
samoht added a commit to samoht/mirage that referenced this issue Apr 6, 2024
See ocaml/dune#10399 why this needed.
Otherwise we'll always have to install all the x-compilers all
the time, which is not what we want.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant