-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(x-compilation): resolution failure for transitive ppx_runtime_li…
…braries Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
- Loading branch information
1 parent
6282041
commit 079376b
Showing
8 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
...-cases/custom-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/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 1.0) | ||
|
||
(package | ||
(name other-ppx)) |
7 changes: 7 additions & 0 deletions
7
...-cases/custom-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/plugins/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,7 @@ | ||
(library | ||
(name other_ppx_eq) | ||
(public_name other-ppx.eq) | ||
(libraries other-ppx.api) | ||
(ppx.driver | ||
(main Other_ppx_eq.main)) | ||
(kind ppx_deriver)) |
15 changes: 15 additions & 0 deletions
15
...om-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/plugins/other_ppx_eq.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,15 @@ | ||
let deriver = "eq" | ||
|
||
let main () = | ||
let out = ref "" in | ||
let args = | ||
[ ("-o", Arg.Set_string out, "") | ||
; ("--impl", Arg.Set_string (ref ""), "") | ||
; ("--as-ppx", Arg.Set (ref false), "") | ||
; ("--cookie", Arg.Set (ref false), "") | ||
] | ||
in | ||
let anon _ = () in | ||
Arg.parse (Arg.align args) anon ""; | ||
let out = open_out !out in | ||
close_out out; |
5 changes: 5 additions & 0 deletions
5
...-cases/custom-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/src/api/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,5 @@ | ||
(library | ||
(name other_ppx_api) | ||
(public_name other-ppx.api) | ||
(wrapped false) | ||
(ppx_runtime_libraries other_ppx_runtime)) |
1 change: 1 addition & 0 deletions
1
...om-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/src/api/ppx_deriving.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 @@ | ||
let () = () |
4 changes: 4 additions & 0 deletions
4
...es/custom-cross-compilation/ppx-runtime-libraries-transitive.t/other-ppx/src/runtime/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,4 @@ | ||
(library | ||
(name other_ppx_runtime) | ||
(public_name other-ppx.runtime) | ||
(wrapped false)) |
1 change: 1 addition & 0 deletions
1
...compilation/ppx-runtime-libraries-transitive.t/other-ppx/src/runtime/other_ppx_runtime.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 @@ | ||
let () = () |
34 changes: 34 additions & 0 deletions
34
...ackbox-tests/test-cases/custom-cross-compilation/ppx-runtime-libraries-transitive.t/run.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,34 @@ | ||
Demonstrate a bad interaction between cross-compilation and | ||
ppx_runtime_libraries | ||
|
||
$ mkdir -p etc/findlib.conf.d | ||
$ export OCAMLFIND_CONF=$PWD/etc/findlib.conf | ||
$ touch etc/findlib.conf etc/findlib.conf.d/foo.conf | ||
|
||
$ mkdir lib | ||
$ cat > dune-project <<EOF | ||
> (lang dune 3.8) | ||
> (package (name ppx-cross)) | ||
> EOF | ||
|
||
$ cat > lib/dune <<EOF | ||
> (library | ||
> (name lib) | ||
> (public_name ppx-cross.lib) | ||
> (preprocess (pps other-ppx.eq))) | ||
> EOF | ||
$ touch lib/lib.ml | ||
|
||
$ dune build @install -x foo | ||
File "other-ppx/src/api/dune", line 5, characters 24-41: | ||
5 | (ppx_runtime_libraries other_ppx_runtime)) | ||
^^^^^^^^^^^^^^^^^ | ||
Error: Library "other_ppx_runtime" not found. | ||
-> required by library "other-ppx.api" in _build/default/other-ppx/src/api | ||
-> required by library "ppx-cross.lib" in _build/default.foo/lib | ||
-> required by _build/default.foo/META.ppx-cross | ||
-> required by _build/install/default.foo/lib/ppx-cross/META | ||
-> required by _build/default.foo/ppx-cross-foo.install | ||
-> required by alias install (context default.foo) | ||
[1] | ||
|