| 1 |
$ ocamlc_where="$(ocamlc -where)" |
| 2 |
$ export BUILD_PATH_PREFIX_MAP="/OCAMLC_WHERE=$ocamlc_where:$BUILD_PATH_PREFIX_MAP" |
| 3 |
$ unset OPAMCONFIRMLEVEL |
| 4 |
|
| 5 |
We call `$(opam switch show)` so that this test always uses an existing switch |
| 6 |
|
| 7 |
$ cat >dune-workspace <<EOF |
| 8 |
> (lang dune 2.0) |
| 9 |
> (context (default)) |
| 10 |
> (context |
| 11 |
> (opam |
| 12 |
> (name cross) |
| 13 |
> (switch $(opam switch show)) |
| 14 |
> (merlin))) |
| 15 |
> EOF |
| 16 |
|
| 17 |
$ dune build |
| 18 |
|
| 19 |
$ ls -a _build/cross/.merlin-conf |
| 20 |
. |
| 21 |
.. |
| 22 |
lib-foo |
| 23 |
|
| 24 |
$ dune ocaml merlin dump-config --format=json "$PWD" | jq -r ' |
| 25 |
> include "dune"; |
| 26 |
> merlinEntry("Foo") |
| 27 |
> | merlinJsonEntryWithConfigNames(["STDLIB", "UNIT_NAME"]) |
| 28 |
> ' |
| 29 |
Foo: _build/cross/foo |
| 30 |
["STDLIB","/OCAMLC_WHERE"] |
| 31 |
["UNIT_NAME","foo"] |
| 32 |
Foo: _build/cross/foo.ml |
| 33 |
["STDLIB","/OCAMLC_WHERE"] |
| 34 |
["UNIT_NAME","foo"] |