Test case to reproduce scope bug when building ppx

The scope selected when building the ppx is bogus (it corresponds to the
directory with the ppx exe).
This commit is contained in:
Rudi Grinberg 2018-01-24 20:14:30 +08:00
parent ad9b82e92a
commit 2eb45c4ae3
8 changed files with 34 additions and 0 deletions

View File

@ -267,3 +267,13 @@
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected)))))))
(alias
((name runtest)
(deps ((files_recursively_in test-cases/scope-ppx-bug)))
(action
(chdir test-cases/scope-ppx-bug
(setenv JBUILDER ${bin:jbuilder}
(progn
(run ${exe:cram.exe} run.t)
(diff? run.t run.t.corrected)))))))

View File

@ -0,0 +1,6 @@
(jbuild_version 1)
(library
((name a_kernel)
(public_name a.kernel)
(kind ppx_rewriter)))

View File

@ -0,0 +1,7 @@
(jbuild_version 1)
(library
((name a)
(public_name a)
(kind ppx_rewriter)
(libraries (a_kernel))))

View File

@ -0,0 +1,6 @@
(jbuild_version 1)
(library
((name b)
(public_name b)
(preprocess (pps (a)))))

View File

@ -0,0 +1,5 @@
$ $JBUILDER build -j1 --root . @install
Error: External library "a_kernel" not found.
-> required by ".ppx/a_kernel/jbuild (context default)"
Hint: try: jbuilder external-lib-deps --missing --root . @install
[1]