-
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.
test: staged_pps and sandboxing (#6747)
regression test for #6644 Signed-off-by: Rudi Grinberg <[email protected]>
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
staged_pps should work even if sandboxing is enabled | ||
|
||
Regression test for #6644 | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.6) | ||
> (package | ||
> (name foo)) | ||
> EOF | ||
|
||
$ cat >dune <<EOF | ||
> (library | ||
> (name driver1) | ||
> (public_name foo.driver) | ||
> (modules ()) | ||
> (ppx.driver (main "(fun () -> assert false)"))) | ||
> (library | ||
> (name dummy_rewriter) | ||
> (modules ()) | ||
> (libraries driver1) | ||
> (kind ppx_rewriter)) | ||
> (library | ||
> (name foo) | ||
> (modules foo) | ||
> (preprocess (staged_pps dummy_rewriter))) | ||
> EOF | ||
$ touch foo.ml | ||
|
||
$ dune build foo.cma | ||
File ".foo.objs/byte/_unknown_", line 1, characters 0-0: | ||
Error: This rule forbids all sandboxing modes (but it also requires | ||
sandboxing) | ||
[1] |