File tree Expand file tree Collapse file tree 2 files changed +26
-10
lines changed
test/blackbox-tests/test-cases/melange Expand file tree Collapse file tree 2 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -325,7 +325,10 @@ let build_cm
325325 ; A " -c"
326326 ; Command.Ml_kind. flag ml_kind
327327 ; Dep src
328- ; Hidden_deps (Dep.Set. of_files (Option. to_list original))
328+ ; (* We add a hidden dependency on the original, pre-PPX source
329+ file, which the compiler wants to find to display error
330+ location snippets. *)
331+ Hidden_deps (Dep.Set. of_files (Option. to_list original))
329332 ; other_targets
330333 ]
331334 >> | Action.Full. add_sandbox sandbox))
Original file line number Diff line number Diff line change @@ -15,15 +15,8 @@ Show PPX snippet preview is shown in Dune
1515 > let x : nope = " hello"
1616 > EOF
1717
18- $ cat > dune << EOF
19- > (melange. emit
20- > (target output)
21- > (libraries the_lib)
22- > (emit_stdlib false))
23- > EOF
24-
2518 $ export DUNE_SANDBOX= symlink
26- $ dune build @ melange
19+ $ dune build @ all
2720 File " lib/the_lib.ml" , line 1 , characters 7 -11:
2821 1 | let x : nope = " hello"
2922 ^^^^
@@ -33,10 +26,30 @@ Show PPX snippet preview is shown in Dune
3326Works if the sandbox is disabled
3427
3528 $ export DUNE_SANDBOX= none
36- $ dune build @ melange
29+ $ dune build @ all
3730 File " lib/the_lib.ml" , line 1 , characters 7 -11:
3831 1 | let x : nope = " hello"
3932 ^^^^
4033 Error: Unbound type constructor nope
4134 [1 ]
4235
36+ $ cat > lib / the_lib. mli << EOF
37+ > val x : nope
38+ > EOF
39+
40+ $ export DUNE_SANDBOX= symlink
41+ $ dune build @ all
42+ File " lib/the_lib.mli" , line 1 , characters 7 -11:
43+ 1 | val x : nope
44+ ^^^^
45+ Error: Unbound type constructor nope
46+ [1 ]
47+
48+ $ export DUNE_SANDBOX= none
49+ $ dune build @ all
50+ File " lib/the_lib.mli" , line 1 , characters 7 -11:
51+ 1 | val x : nope
52+ ^^^^
53+ Error: Unbound type constructor nope
54+ [1 ]
55+
You can’t perform that action at this time.
0 commit comments