-
Notifications
You must be signed in to change notification settings - Fork 415
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(x-compilation): find host ppx dependencies in the host context
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
- Loading branch information
1 parent
c75ecf0
commit 312f778
Showing
13 changed files
with
134 additions
and
60 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
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
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
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
41 changes: 29 additions & 12 deletions
41
test/blackbox-tests/test-cases/ppx-cross-context-issue.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 |
---|---|---|
@@ -1,12 +1,29 @@ | ||
# Using a ppx in a cross-compiled build context makes dune try to build the ppx | ||
# in the target context instead of the host, then fail. | ||
$ dune build --debug-dependency-path | ||
File "lib/dune", line 3, characters 18-24: | ||
3 | (preprocess (pps fooppx))) | ||
^^^^^^ | ||
Error: Library "fooppx" in _build/cross-environment/ppx is hidden | ||
(unsatisfied 'enabled_if'). | ||
-> required by _build/cross-environment/lib/lib.pp.ml | ||
-> required by alias lib/all (context cross-environment) | ||
-> required by alias default (context cross-environment) | ||
[1] | ||
Dune uses the host context to look up dependencies and build PPXes | ||
|
||
$ dune build --display=short | ||
ocamlc lib/.foolib.objs/byte/foolib.{cmi,cmo,cmt} | ||
ocamlc ppx/.fooppx.objs/byte/fooppx.{cmi,cmo,cmt} | ||
ocamlc lib/.foolib.objs/byte/foolib.{cmi,cmo,cmt} [cross-environment] | ||
ocamlopt lib/.foolib.objs/native/foolib.{cmx,o} | ||
ocamlc .ppx/4128e43a9cfb141a37f547484cc9bf46/dune__exe___ppx.{cmi,cmo} | ||
ocamlopt ppx/.fooppx.objs/native/fooppx.{cmx,o} | ||
ocamlc ppx/fooppx.cma | ||
ocamlopt lib/.foolib.objs/native/foolib.{cmx,o} [cross-environment] | ||
ocamlopt .ppx/4128e43a9cfb141a37f547484cc9bf46/dune__exe___ppx.{cmx,o} | ||
ocamlopt ppx/fooppx.{a,cmxa} | ||
ocamlopt .ppx/4128e43a9cfb141a37f547484cc9bf46/ppx.exe | ||
ocamlopt ppx/fooppx.cmxs | ||
ppx lib/lib.pp.ml | ||
ppx lib/lib.pp.ml [cross-environment] | ||
ocamldep lib/.foolib.objs/foolib__Lib.impl.d | ||
ocamldep lib/.foolib.objs/foolib__Lib.impl.d [cross-environment] | ||
ocamlc lib/.foolib.objs/byte/foolib__Lib.{cmi,cmo,cmt} | ||
ocamlc lib/.foolib.objs/byte/foolib__Lib.{cmi,cmo,cmt} [cross-environment] | ||
ocamlopt lib/.foolib.objs/native/foolib__Lib.{cmx,o} | ||
ocamlc lib/foolib.cma | ||
ocamlopt lib/.foolib.objs/native/foolib__Lib.{cmx,o} [cross-environment] | ||
ocamlc lib/foolib.cma [cross-environment] | ||
ocamlopt lib/foolib.{a,cmxa} | ||
ocamlopt lib/foolib.{a,cmxa} [cross-environment] | ||
ocamlopt lib/foolib.cmxs | ||
ocamlopt lib/foolib.cmxs [cross-environment] |