Skip to content

Commit

Permalink
test: print flags for vendored projects (ocaml#9521)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Dec 18, 2023
1 parent 93beff6 commit 013ae8a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/blackbox-tests/test-cases/github7034.t/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down

0 comments on commit 013ae8a

Please sign in to comment.