-
Notifications
You must be signed in to change notification settings - Fork 409
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
Reproduction case to show that installing deps to the stdlib breaks #10565
Reproduction case to show that installing deps to the stdlib breaks #10565
Conversation
343198f
to
0d2d648
Compare
That's indeed and addressing it is not easy. The fundamental issue is that what Have you looked into working with upstream to address this issue in a different way? The easiest way forward would be to prevent |
I agree that this is fairly problematic behavior but given the history of An alternative approach I could imagine is that for every package that installs into an The other option, as you suggest, with all packages installing to a project-global The final solution is forking |
@@ -57,4 +57,12 @@ With this project set up, lets depend on it. | |||
$ cat > foo.ml <<EOF | |||
> let () = Nondune.main () | |||
> EOF | |||
$ dune exec ./foo.exe 2>&1 | sed -e 's#File unavailable: .*ocaml/nondune.cma$#File unavailable: ocaml/nondune.cma#' | |||
$ dune exec ./foo.exe 2>&1 | dune_cmd stdlib-path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you can:
- get that from
ocamlc -config
- use
BUILD_PATH_PREFIX_MAP
$ OCAML_STDLIB=$(ocamlc -config|grep standard_library:|cut -d ' ' -f2)
$ BUILD_PATH_PREFIX_MAP="/OCAML_STDLIB=$OCAML_STDLIB:$BUILD_PATH_PREFIX_MAP"
Given that this issue is only limited to a single package, I'm inclined to work with the We don't necessarily need to create an overlay for num. If we introduce a flag that |
I am not sure how prevalent this is in the general OCaml package universe. Recent compat packages like I've opened a PR for the "legacy" mode to install into the package folder as well: ocaml/num#40 (and adjust the
That's what
The PR linked above makes the "opam-legacy" mode a bit more similar to "opam-modern" by removing a bit of special-casing. |
4cf924c
to
2bc14fc
Compare
Signed-off-by: Marek Kubica <marek@tarides.com>
2bc14fc
to
3980fbd
Compare
…caml#10565) Signed-off-by: Marek Kubica <marek@tarides.com>
When a package specifies in its
META
file that its artifacts are installed into^
(or+
) thus the stdlib and its.install
file then installs it into$lib_root/ocaml/...
this does not yield a-I
flag when compiling (as normally the stdlib is implied).This works on compilers in OPAM switches, but if the package is installed in
_build
as part of dune-pkg, then the package files are installed into$pkg_lib_root/ocaml/...
but runningocamlc
does not pick up the path.This attempts to reproduce the issue, however the actual issue with
num
looks a bit different asocamlc
fails to locatebig_int.cmi
but thecmi
is not in any path that is added to-I
.