-
Notifications
You must be signed in to change notification settings - Fork 410
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
[dune engine] [bug] Error file unavaiable when an absolute path points to a symlink. #5833
Comments
This comment was marked as resolved.
This comment was marked as resolved.
Note the file coqdep produces is an absolute path (that could be the point is confusing dune) Ali mentioned that the problem could be related to the cache, that was my impression too, but I'm not sure. |
Windows builds and cache enabled seems to trigger it. |
It can be triggered reliably c.f. coq/coq#15608 |
We found more info on this, updating the issue. |
Seems related to coq/coq#15608 and ocaml/dune#5833.
Seems related to coq/coq#15608 and ocaml/dune#5833.
Seems related to coq/coq#15608 and ocaml/dune#5833.
I'm experiencing a similar problem, also in the context of a Coq project with plugins. Has anyone understood the problem yet? Is there a workaround? |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I have several plugins, and hence several
And the corresponding declaration in a Coq file is:
|
That's on 8.16 , right? What's the name of the META file that coqdep generates? I'm afraid that we may want to patch |
Yes, on Coq 8.16.0. I'm not sure what the name of the generated |
If the legacy mode is set, we don't even attempt to use findlib to resolve anything, we also won't emit a META dependency, even if this dependency is in scope. This is morally the right thing to do, should reduce non-determinism, and helps a bit to isolate the legacy code more. This should help with problems such as ocaml/dune#5833
I mean, what is the name of the file that dune crashes on? But indeed I think we should write a patch for Coq 8.16.1 , see coq/coq#16658 |
@rlepigre let me know if that PR fixes the problem for you. |
Oh sorry. The error I get is something like:
I'll try out the MR later and let you know. Thanks! |
I see thanks, my PR should fix that for now, hopefully. The Dune bug should also be fixed of course. |
If the legacy mode is set, we don't even attempt to use findlib to resolve anything, we also won't emit a META dependency, even if this dependency is in scope. This is morally the right thing to do, should reduce non-determinism, and helps a bit to isolate the legacy code more. This should help with problems such as ocaml/dune#5833 Co-authored-by: Emilio Jesús Gallego Arias <e@x80.org>
[coqdep] Be more deterministic w.r.t. the plugin loading mode If the legacy mode is set, we don't even attempt to use findlib to resolve anything, we also won't emit a META dependency, even if this dependency is in scope. This is morally the right thing to do, should reduce non-determinism, and helps a bit to isolate the legacy code more. This should help with problems such as ocaml/dune#5833 Co-authored-by: Emilio Jesús Gallego Arias <e@x80.org>
[coqdep] Be more deterministic w.r.t. the plugin loading mode If the legacy mode is set, we don't even attempt to use findlib to resolve anything, we also won't emit a META dependency, even if this dependency is in scope. This is morally the right thing to do, should reduce non-determinism, and helps a bit to isolate the legacy code more. This should help with problems such as ocaml/dune#5833 Co-authored-by: Emilio Jesús Gallego Arias <e@x80.org>
@ejgallego I confirmed that your patch to Coq (or rather, my back-ported version of it) fixes my problem. Thanks! |
Glad to hear @rlepigre ; actually there is not a lot that we need to support the new findlib loading mode in Dune, main road block is coq/coq#16571 but that should be not too hard to fix when we get a minute. |
If the legacy mode is set, we don't even attempt to use findlib to resolve anything, we also won't emit a META dependency, even if this dependency is in scope. This is morally the right thing to do, should reduce non-determinism, and helps a bit to isolate the legacy code more. This should help with problems such as ocaml/dune#5833 Co-authored-by: Emilio Jesús Gallego Arias <e@x80.org>
Dune seems to error when
dune build $file
is called with$file
being an absolute path towards a symlink.Example with a trivial project that builds library foo:
This is where the error is raised:
dune/src/dune_engine/load_rules.ml
Line 291 in faa9254
This seems like a bug in Dune. If the dep on the external file is not allowed, Dune should error at
Action_build.dyn_deps
.Note that the missing file is a symlink for the error to be produced.
Likely test case to reproduce:
Action_builder.dyn_paths
that depends on something that is a symlink and uses an absolute path.note: I have cleaned up this issue as the discussion was quite confusing due to some users hitting this bug + a Coq bug. The Coq bug is unrealted, this seems like a pure dune issue.
The text was updated successfully, but these errors were encountered: