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.
test: print flags for vendored projects (ocaml#9521)
Signed-off-by: Rudi Grinberg <[email protected]>
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,16 @@ But when lang dune is 3.3 or higher the warning becomes an error: | |
-short-paths | ||
-keep-locs)) | ||
Leaving directory 'outer' | ||
$ dune printenv outer/vendored/inner --root=outer --field flags | ||
Entering directory 'outer' | ||
(flags | ||
(-w | ||
@[email protected]@30..39@[email protected]@[email protected]@67@69-40 | ||
-strict-sequence | ||
-strict-formats | ||
-short-paths | ||
-keep-locs)) | ||
Leaving directory 'outer' | ||
$ dune build --root=outer | ||
Entering directory 'outer' | ||
File "vendored/inner/inner.ml", line 6, characters 11-18: | ||
|
@@ -104,6 +114,15 @@ But when lang dune is 3.3 or higher the warning becomes an error: | |
Error (warning 69 [unused-field]): unused record field x. | ||
Leaving directory 'outer' | ||
[1] | ||
$ pat="\-o [./a-zA-Z_]\{1,\}.cmx" | ||
$ log=outer/_build/log | ||
$ grep -o "$pat" $log | sort | ||
-o .outer.eobjs/native/dune__exe__Outer.cmx | ||
-o vendored/inner/.inner.objs/native/inner.cmx | ||
$ grep "$pat" $log | sort | grep -n -E -o "\-w [^ ]+" | ||
1:-w @[email protected]@30..39@[email protected]@[email protected]@67@69-40 | ||
2:-w @[email protected]@30..39@[email protected]@[email protected]@67@69-40 | ||
2:-w -a | ||
This is unexpected as vendored projects should be built according to their | ||
declared dune-project rather than the dune-project of the outer project. | ||
|