Skip to content

Add failing test when cross-compiling with ppxs#4155

Merged
rgrinberg merged 1 commit intoocaml:mainfrom
TheLortex:ppx-cross-context-issue
Feb 9, 2021
Merged

Add failing test when cross-compiling with ppxs#4155
rgrinberg merged 1 commit intoocaml:mainfrom
TheLortex:ppx-cross-context-issue

Conversation

@TheLortex
Copy link
Copy Markdown
Collaborator

Fails with:

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 lib/lib.pp.ml (context cross-environment)
-> required by alias lib/all (context cross-environment)
-> required by alias default (context cross-environment)
Hint: try:
  dune external-lib-deps --missing --debug-dependency-path @@default
[1]

@rgrinberg
Copy link
Copy Markdown
Member

Does this PR fix this issue? #3751

@TheLortex
Copy link
Copy Markdown
Collaborator Author

Hey, unfortunately no it doesn't.
It looks like in dune_rules/preprocessing.ml, calls to Lib.DB.resolve_pps are made with the wrong scope (using the current scope instead of the host scope).

@@ -0,0 +1 @@
$ dune build --debug-dependency-path
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget to promote?

This test also needs a description of the problem that it's trying to test.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promoted the error and added a description!

Signed-off-by: Lucas Pluvinage <lucas@tarides.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants