-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for re-exporting transitive dependencies
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
- Loading branch information
Showing
9 changed files
with
78 additions
and
4 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
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
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,26 @@ | ||
dependencies can be exported transitively: | ||
$ dune exec ./foo.exe --root transitive | ||
Entering directory 'transitive' | ||
Entering directory 'transitive' | ||
ocamlc .foo.eobjs/byte/dune__exe__Foo.{cmi,cmo,cmt} (exit 2) | ||
(cd _build/default && /Users/rgrinberg/.opam/4.08.0/bin/ocamlc.opt -w @1..3@5..28@30..39@43@46..47@49..57@61..62-40 -strict-sequence -strict-formats -short-paths -keep-locs -g -bin-annot -I .foo.eobjs/byte -I .aaa.objs/byte -I .aaa.objs/native -no-alias-deps -opaque -o .foo.eobjs/byte/dune__exe__Foo.cmo -c -impl foo.ml) | ||
File "foo.ml", line 1, characters 11-14: | ||
1 | module A = AAA | ||
^^^ | ||
Error (warning 49): no cmi file was found in path for module AAA | ||
File "foo.ml", line 2, characters 11-14: | ||
2 | module B = BBB | ||
^^^ | ||
Error (warning 49): no cmi file was found in path for module BBB | ||
File "foo.ml", line 3, characters 11-14: | ||
3 | module C = CCC | ||
^^^ | ||
Error (warning 49): no cmi file was found in path for module CCC | ||
[1] | ||
|
||
transtive deps expressed in the dune-package | ||
|
||
$ dune build @install --root transitive | ||
Entering directory 'transitive' | ||
$ cat transitive/_build/install/default/lib/pkg/dune-package | grep re_exports | ||
[1] |
Empty file.
Empty file.
Empty file.
23 changes: 23 additions & 0 deletions
23
test/blackbox-tests/test-cases/re-exported-deps/transitive/dune
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,23 @@ | ||
(library | ||
(public_name pkg.aaa) | ||
(name aaa) | ||
(libraries bbb) | ||
(modules aaa) | ||
(re_exports bbb)) | ||
|
||
(library | ||
(public_name pkg.bbb) | ||
(name bbb) | ||
(libraries ccc) | ||
(modules bbb) | ||
(re_exports ccc)) | ||
|
||
(library | ||
(modules ccc) | ||
(name ccc) | ||
(public_name pkg.ccc)) | ||
|
||
(executable | ||
(name foo) | ||
(modules foo) | ||
(libraries aaa)) |
4 changes: 4 additions & 0 deletions
4
test/blackbox-tests/test-cases/re-exported-deps/transitive/dune-project
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,4 @@ | ||
(lang dune 2.0) | ||
|
||
(package | ||
(name pkg)) |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/re-exported-deps/transitive/foo.ml
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,3 @@ | ||
module A = AAA | ||
module B = BBB | ||
module C = CCC |