-
Notifications
You must be signed in to change notification settings - Fork 413
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
Crash with directory targets and multiple workspace contexts #10310
Comments
Merged
I've simplified this repro and added a test that reproduces it #10330 |
It looks like this crash happens whenever a directory target is disabled via
|
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Mar 29, 2024
The validation in question was comparing directory targets discovered in the project from directories that are the target of enabled rules (rules which lack an `enabled_if` field, or whose `enabled_if` condition is false). This was incorrect as it doesn't account for directory targets which are the target of disabled rules so the validation fails if any rule with a directory target is disabled. The validation step was introduced in 1fd19d7 but there aren't any clues to why it was necessary. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
vouillon
pushed a commit
to ocaml-wasm/dune
that referenced
this issue
Mar 29, 2024
The validation in question was comparing directory targets discovered in the project from directories that are the target of enabled rules (rules which lack an `enabled_if` field, or whose `enabled_if` condition is false). This was incorrect as it doesn't account for directory targets which are the target of disabled rules so the validation fails if any rule with a directory target is disabled. The validation step was introduced in 1fd19d7 but there aren't any clues to why it was necessary. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 3, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 3, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 3, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
that referenced
this issue
Apr 3, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes #10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
See #10367 (comment). |
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 4, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 4, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 5, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
gridbugs
added a commit
to gridbugs/dune
that referenced
this issue
Apr 5, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
rgrinberg
pushed a commit
to gridbugs/dune
that referenced
this issue
Apr 7, 2024
Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
rgrinberg
pushed a commit
that referenced
this issue
Apr 7, 2024
* Allow rules with directory targets to be disabled Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes #10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
emillon
pushed a commit
to emillon/dune
that referenced
this issue
Apr 17, 2024
* Allow rules with directory targets to be disabled Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes ocaml#10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
emillon
added a commit
that referenced
this issue
Apr 17, 2024
* Add repro for gh10310 (#10330) Signed-off-by: Stephen Sherratt <stephen@sherra.tt> * Allow rules with directory targets to be disabled (again) (#10382) * Allow rules with directory targets to be disabled Previously attempting to disable a rule with a directory target would cause dune to crash. Fixes #10310 Signed-off-by: Stephen Sherratt <stephen@sherra.tt> --------- Signed-off-by: Stephen Sherratt <stephen@sherra.tt> Co-authored-by: Stephen Sherratt <stephen@sherra.tt>
emillon
added a commit
to emillon/opam-repository
that referenced
this issue
Apr 17, 2024
CHANGES: ### Fixed - Fix overflow in sendfile stubs (copy of large files could fail or end with truncated files) (ocaml/dune#10333, @tonyfettes) - Fix crash when a rule with a directory target is disabled with `enabled_if` (ocaml/dune#10382, fixes ocaml/dune#10310, @gridbugs) - melange: remove all restrictions around virtual libraries in Melange. They may be used as otherwise in libraries and executables. (ocaml/dune#10412, @anmonteiro) - spawn: fix compatibility with RHEL7 (ocaml/dune#10428, @emillon)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/samoht/dune-crash for a repro.
Full error message:
The text was updated successfully, but these errors were encountered: