-
Notifications
You must be signed in to change notification settings - Fork 412
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test showing that S dirs of implicit deps are not sent to Merlin
Signed-off-by: Ulysse Gérard <thevoodoos@gmail.com>
- Loading branch information
Showing
8 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/bin/dune
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,3 @@ | ||
(executable | ||
(name main) | ||
(libraries lib1)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/bin/main.ml
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 @@ | ||
type t = Lib1.t |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/dune-project
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,2 @@ | ||
(lang dune 2.0) | ||
(implicit_transitive_deps false) |
36 changes: 36 additions & 0 deletions
36
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/run.t
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,36 @@ | ||
$ stdlib="$(ocamlc -where)" | ||
$ export BUILD_PATH_PREFIX_MAP="/STDLIB=$stdlib:$BUILD_PATH_PREFIX_MAP" | ||
|
||
$ dune build @check | ||
|
||
FIXME: Merlin must be able to locate the definitions of values coming from an | ||
implicit transitive dependency, even when `implicit-transitive-dependency` is | ||
set to `false`. They should be part of the source path returned by the | ||
configuration. | ||
|
||
In this test the dependencies are as follow: | ||
main -> lib1 -> lib2 -> stdlib | ||
|
||
$ FILE=$PWD/bin/main.ml | ||
$ printf "(4:File%d:%s)" ${#FILE} $FILE | dune ocaml-merlin | | ||
> sed -E "s/[[:digit:]]+:/\?:/g" | tr '(' '\n' | grep -E ":[BS]H?\?" | ||
?:B?:$TESTCASE_ROOT/_build/default/bin/.main.eobjs/byte) | ||
?:B?:$TESTCASE_ROOT/_build/default/src/lib1/.lib1.objs/byte) | ||
?:S?:$TESTCASE_ROOT/bin) | ||
?:S?:$TESTCASE_ROOT/src/lib1) | ||
|
||
$ FILE=$PWD/src/lib1/lib1.ml | ||
$ printf "(4:File%d:%s)" ${#FILE} $FILE | dune ocaml-merlin | | ||
> sed -E "s/[[:digit:]]+:/\?:/g" | tr '(' '\n' | grep -E ":[BS]H?\?" | ||
?:B?:$TESTCASE_ROOT/_build/default/src/lib1/.lib1.objs/byte) | ||
?:B?:$TESTCASE_ROOT/_build/default/src/lib2/.lib2.objs/byte) | ||
?:S?:$TESTCASE_ROOT/src/lib1) | ||
?:S?:$TESTCASE_ROOT/src/lib2) | ||
|
||
$ FILE=$PWD/src/lib2/lib2.ml | ||
$ printf "(4:File%d:%s)" ${#FILE} $FILE | dune ocaml-merlin | | ||
> sed -E "s/[[:digit:]]+:/\?:/g" | tr '(' '\n' | grep -E ":[BS]H?\?" | ||
?:B?:/STDLIB) | ||
?:B?:$TESTCASE_ROOT/_build/default/src/lib2/.lib2.objs/byte) | ||
?:S?:/STDLIB) | ||
?:S?:$TESTCASE_ROOT/src/lib2) |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/src/lib1/dune
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,3 @@ | ||
(library | ||
(name lib1) | ||
(libraries lib2)) |
1 change: 1 addition & 0 deletions
1
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/src/lib1/lib1.ml
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 @@ | ||
include Lib2 |
2 changes: 2 additions & 0 deletions
2
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/src/lib2/dune
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,2 @@ | ||
(library | ||
(name lib2)) |
3 changes: 3 additions & 0 deletions
3
test/blackbox-tests/test-cases/merlin/implicit-transitive-deps.t/src/lib2/lib2.ml
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,3 @@ | ||
type t = bool | ||
|
||
type r = float |