forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove incorrect validation step for dir targets
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>
- Loading branch information
Showing
2 changed files
with
15 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
test/blackbox-tests/test-cases/disable-rule-with-directory-target.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
|
||
$ cat > dune-project <<EOF | ||
> (lang dune 3.14) | ||
> (using directory-targets 0.1) | ||
> EOF | ||
|
||
$ cat > dune <<EOF | ||
> (rule | ||
> (enabled_if false) | ||
> (target (dir x)) | ||
> (action (run mkdir x))) | ||
> EOF | ||
|
||
$ dune build |