From 5a6a015e2d5be6bacca698879702c179390ff8b9 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Tue, 31 May 2022 16:38:32 +0200 Subject: [PATCH] Move test infra inside tests/ --- analysis/Makefile | 12 +- analysis/tests/Makefile | 15 ++ analysis/tests/src/expected/Auto.res.txt | 2 +- .../src/expected/CompletePrioritize1.res.txt | 2 +- .../src/expected/CompletePrioritize2.res.txt | 4 +- .../tests/src/expected/Completion.res.txt | 152 +++++++++--------- .../src/expected/CreateInterface.res.txt | 2 +- analysis/tests/src/expected/Cross.res.txt | 18 +-- analysis/tests/src/expected/Debug.res.txt | 82 +++++----- .../tests/src/expected/Definition.res.txt | 12 +- .../expected/DefinitionWithInterface.res.txt | 2 +- .../expected/DefinitionWithInterface.resi.txt | 2 +- analysis/tests/src/expected/Div.res.txt | 4 +- .../tests/src/expected/DocumentSymbol.res.txt | 2 +- analysis/tests/src/expected/Fragment.res.txt | 4 +- analysis/tests/src/expected/Highlight.res.txt | 2 +- analysis/tests/src/expected/Hover.res.txt | 54 +++---- analysis/tests/src/expected/Jsx.res.txt | 68 ++++---- analysis/tests/src/expected/Jsx.resi.txt | 8 +- .../tests/src/expected/LongIdentTest.res.txt | 2 +- analysis/tests/src/expected/Patterns.res.txt | 10 +- .../tests/src/expected/RecModules.res.txt | 4 +- .../src/expected/RecordCompletion.res.txt | 8 +- .../tests/src/expected/RecoveryOnProp.res.txt | 2 +- .../tests/src/expected/References.res.txt | 4 +- .../expected/ReferencesWithInterface.res.txt | 2 +- .../expected/ReferencesWithInterface.resi.txt | 2 +- analysis/tests/src/expected/Rename.res.txt | 4 +- .../src/expected/RenameWithInterface.res.txt | 2 +- .../src/expected/RenameWithInterface.resi.txt | 2 +- .../tests/src/expected/TypeDefinition.res.txt | 12 +- analysis/tests/src/expected/Xform.res.txt | 24 +-- analysis/{ => tests}/test.sh | 8 +- 33 files changed, 272 insertions(+), 261 deletions(-) create mode 100644 analysis/tests/Makefile rename analysis/{ => tests}/test.sh (73%) diff --git a/analysis/Makefile b/analysis/Makefile index fa2cc0605..1388a20a8 100644 --- a/analysis/Makefile +++ b/analysis/Makefile @@ -8,21 +8,17 @@ build-native: dce: build-native opam exec reanalyze.exe -- -dce-cmt _build -suppress vendor -tests/node_modules/.bin/rescript: - @cd tests && npm install - -test-analysis-binary: build-native tests/node_modules/.bin/rescript - @cd tests && node_modules/.bin/rescript - ./test.sh +test-analysis-binary: build-native + make -C tests test test-reanalyze: build-native make -C reanalyze test test: test-analysis-binary test-reanalyze -clean: tests/node_modules/.bin/rescript +clean: rm -f rescript-editor-analysis.exe - @cd tests && node_modules/.bin/rescript clean + make -C tests test dune clean make -C reanalyze clean diff --git a/analysis/tests/Makefile b/analysis/tests/Makefile new file mode 100644 index 000000000..07471d2c2 --- /dev/null +++ b/analysis/tests/Makefile @@ -0,0 +1,15 @@ +SHELL = /bin/bash + +node_modules/.bin/rescript: + npm install + +test: node_modules/.bin/rescript + node_modules/.bin/rescript + ./test.sh + +clean: node_modules/.bin/rescript + node_modules/.bin/rescript clean -with-deps + +.DEFAULT_GOAL := test + +.PHONY: clean test diff --git a/analysis/tests/src/expected/Auto.res.txt b/analysis/tests/src/expected/Auto.res.txt index f82058d6b..19a71c8b6 100644 --- a/analysis/tests/src/expected/Auto.res.txt +++ b/analysis/tests/src/expected/Auto.res.txt @@ -1,3 +1,3 @@ -Hover tests/src/Auto.res 2:13 +Hover src/Auto.res 2:13 {"contents": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n\n `map xs f`\n\n **return** the list obtained by applying `f` to each element of `xs`\n\n ```\n map [1;2] (fun x-> x + 1) = [3;4]\n ```\n"} diff --git a/analysis/tests/src/expected/CompletePrioritize1.res.txt b/analysis/tests/src/expected/CompletePrioritize1.res.txt index 5f3ed0f42..3f5485410 100644 --- a/analysis/tests/src/expected/CompletePrioritize1.res.txt +++ b/analysis/tests/src/expected/CompletePrioritize1.res.txt @@ -1,4 +1,4 @@ -Complete tests/src/CompletePrioritize1.res 5:6 +Complete src/CompletePrioritize1.res 5:6 posCursor:[5:6] posNoWhite:[5:5] Found expr:[5:3->0:-1] Completable: Cpath Value[a]-> [{ diff --git a/analysis/tests/src/expected/CompletePrioritize2.res.txt b/analysis/tests/src/expected/CompletePrioritize2.res.txt index a83836061..b3b9674e1 100644 --- a/analysis/tests/src/expected/CompletePrioritize2.res.txt +++ b/analysis/tests/src/expected/CompletePrioritize2.res.txt @@ -1,4 +1,4 @@ -Complete tests/src/CompletePrioritize2.res 9:7 +Complete src/CompletePrioritize2.res 9:7 posCursor:[9:7] posNoWhite:[9:6] Found expr:[9:3->0:-1] Completable: Cpath Value[ax]-> [{ @@ -9,7 +9,7 @@ Completable: Cpath Value[ax]-> "documentation": null }] -Complete tests/src/CompletePrioritize2.res 12:5 +Complete src/CompletePrioritize2.res 12:5 posCursor:[12:5] posNoWhite:[12:4] Found expr:[12:3->12:5] Pexp_ident ax:[12:3->12:5] Completable: Cpath Value[ax] diff --git a/analysis/tests/src/expected/Completion.res.txt b/analysis/tests/src/expected/Completion.res.txt index 25a34ef3f..f34dd08a2 100644 --- a/analysis/tests/src/expected/Completion.res.txt +++ b/analysis/tests/src/expected/Completion.res.txt @@ -1,4 +1,4 @@ -Complete tests/src/Completion.res 1:11 +Complete src/Completion.res 1:11 posCursor:[1:11] posNoWhite:[1:10] Found expr:[1:3->1:11] Pexp_ident MyList.m:[1:3->1:11] Completable: Cpath Value[MyList, m] @@ -70,7 +70,7 @@ Completable: Cpath Value[MyList, m] "documentation": null }] -Complete tests/src/Completion.res 3:9 +Complete src/Completion.res 3:9 posCursor:[3:9] posNoWhite:[3:8] Found expr:[3:3->3:9] Pexp_ident Array.:[3:3->3:9] Completable: Cpath Value[Array, ""] @@ -292,7 +292,7 @@ Completable: Cpath Value[Array, ""] "documentation": null }] -Complete tests/src/Completion.res 5:10 +Complete src/Completion.res 5:10 posCursor:[5:10] posNoWhite:[5:9] Found expr:[5:3->5:10] Pexp_ident Array.m:[5:3->5:10] Completable: Cpath Value[Array, m] @@ -346,7 +346,7 @@ Completable: Cpath Value[Array, m] "documentation": {"kind": "markdown", "value": " [mem a l] is true if and only if [a] is equal\n to an element of [l].\n @since 4.03.0 "} }] -Complete tests/src/Completion.res 15:17 +Complete src/Completion.res 15:17 posCursor:[15:17] posNoWhite:[15:16] Found expr:[15:12->15:17] Pexp_ident Dep.c:[15:12->15:17] Completable: Cpath Value[Dep, c] @@ -358,7 +358,7 @@ Completable: Cpath Value[Dep, c] "documentation": {"kind": "markdown", "value": "Deprecated: Use customDouble instead\n\nSome doc comment"} }] -Complete tests/src/Completion.res 23:20 +Complete src/Completion.res 23:20 posCursor:[23:20] posNoWhite:[23:19] Found expr:[23:11->23:20] Pexp_apply ...[23:11->23:18] () Completable: CnamedArg(Value[Lib, foo], "", []) @@ -377,7 +377,7 @@ Found type for function (~age: int, ~name: string) => string "documentation": null }] -Complete tests/src/Completion.res 26:13 +Complete src/Completion.res 26:13 posCursor:[26:13] posNoWhite:[26:12] Found expr:[26:3->26:13] Completable: Cpath array->m [{ @@ -394,7 +394,7 @@ Completable: Cpath array->m "documentation": null }] -Complete tests/src/Completion.res 29:13 +Complete src/Completion.res 29:13 posCursor:[29:13] posNoWhite:[29:12] Found expr:[29:3->29:13] Completable: Cpath string->toU [{ @@ -405,7 +405,7 @@ Completable: Cpath string->toU "documentation": {"kind": "markdown", "value": "\n `toUpperCase str` converts `str` to upper case using the locale-insensitive case mappings in the Unicode Character Database. Notice that the conversion can expand the number of letters in the result; for example the German `ß` capitalizes to two `S`es in a row.\n\n ```\n toUpperCase \"abc\" = \"ABC\";;\n toUpperCase {js|Straße|js} = {js|STRASSE|js};;\n toLowerCase {js|πς|js} = {js|ΠΣ|js};;\n ```\n"} }] -Complete tests/src/Completion.res 34:8 +Complete src/Completion.res 34:8 posCursor:[34:8] posNoWhite:[34:7] Found expr:[34:3->34:8] Completable: Cpath Value[op]->e [{ @@ -422,7 +422,7 @@ Completable: Cpath Value[op]->e "documentation": {"kind": "markdown", "value": "\n `eq optValue1 optvalue2 predicate`\n\n Evaluates two optional values for equality with respect to a predicate function.\n\n If both `optValue1` and `optValue2` are `None`, returns `true`.\n\n If one of the arguments is `Some value` and the other is `None`, returns `false`\n\n If arguments are `Some value1` and `Some value2`, returns the result of `predicate value1 value2`;\n the `predicate` function must return a `bool`\n\n ```\n let clockEqual = (fun a b -> a mod 12 = b mod 12);;\n eq (Some 3) (Some 15) clockEqual = true;;\n eq (Some 3) None clockEqual = false;;\n eq None (Some 3) clockEqual = false;;\n eq None None clockEqual = true;;\n ```\n"} }] -Complete tests/src/Completion.res 44:7 +Complete src/Completion.res 44:7 posCursor:[44:7] posNoWhite:[44:6] Found expr:[44:3->54:3] Pexp_apply ...[50:9->50:10] (...[44:3->50:8], ...[51:2->54:3]) posCursor:[44:7] posNoWhite:[44:6] Found expr:[44:3->50:8] @@ -441,7 +441,7 @@ Completable: Cpath Value[fa]-> "documentation": null }] -Complete tests/src/Completion.res 47:21 +Complete src/Completion.res 47:21 posCursor:[47:21] posNoWhite:[47:20] Found expr:[47:3->47:21] posCursor:[47:21] posNoWhite:[47:20] Found expr:[47:12->47:21] Pexp_ident Js.Dict.u:[47:12->47:21] @@ -460,7 +460,7 @@ Completable: Cpath Value[Js, Dict, u] "documentation": {"kind": "markdown", "value": " Experimental internal function "} }] -Complete tests/src/Completion.res 59:30 +Complete src/Completion.res 59:30 posCursor:[59:30] posNoWhite:[59:29] Found expr:[59:15->59:30] JSX 59:21] second[59:22->59:28]=...[59:29->59:30]> _children:None posCursor:[59:30] posNoWhite:[59:29] Found expr:[59:29->59:30] @@ -474,7 +474,7 @@ Completable: Cpath Value[z] "documentation": null }] -Complete tests/src/Completion.res 62:23 +Complete src/Completion.res 62:23 posCursor:[62:23] posNoWhite:[62:22] Found expr:[62:15->62:23] JSX 62:21] z[62:22->62:23]=...[62:22->62:23]> _children:None Completable: Cjsx([O, Comp], z, [z]) @@ -486,7 +486,7 @@ Completable: Cjsx([O, Comp], z, [z]) "documentation": null }] -Complete tests/src/Completion.res 65:8 +Complete src/Completion.res 65:8 Attribute id:reac:[65:3->65:8] label:reac Completable: Cdecorator(reac) [{ @@ -497,7 +497,7 @@ Completable: Cdecorator(reac) "documentation": {"kind": "markdown", "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the react-jsx config to be set in your `bsconfig.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)."} }] -Complete tests/src/Completion.res 68:10 +Complete src/Completion.res 68:10 posCursor:[68:10] posNoWhite:[68:9] Found expr:[0:-1->86:1] Pexp_apply ...[80:6->80:7] (...[80:8->86:1]) Attribute id:react.let:[68:3->80:3] label:react. @@ -510,7 +510,7 @@ Completable: Cdecorator(react.) "documentation": {"kind": "markdown", "value": "The `@react.component` decorator is used to annotate functions that are RescriptReact components.\n\nYou will need this decorator whenever you want to use a ReScript / React component in ReScript JSX expressions.\n\nNote: The `@react.component` decorator requires the react-jsx config to be set in your `bsconfig.json` to enable the required React transformations.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#react-component-decorator)."} }] -Complete tests/src/Completion.res 71:27 +Complete src/Completion.res 71:27 posCursor:[71:27] posNoWhite:[71:26] Found expr:[71:11->71:27] Pexp_apply ...[71:11->71:18] (~name71:20->71:24=...[71:20->71:24]) Completable: CnamedArg(Value[Lib, foo], "", [name]) @@ -523,7 +523,7 @@ Found type for function (~age: int, ~name: string) => string "documentation": null }] -Complete tests/src/Completion.res 74:26 +Complete src/Completion.res 74:26 posCursor:[74:26] posNoWhite:[74:25] Found expr:[74:11->74:26] Pexp_apply ...[74:11->74:18] (~age74:20->74:23=...[74:20->74:23]) Completable: CnamedArg(Value[Lib, foo], "", [age]) @@ -536,7 +536,7 @@ Found type for function (~age: int, ~name: string) => string "documentation": null }] -Complete tests/src/Completion.res 77:32 +Complete src/Completion.res 77:32 posCursor:[77:32] posNoWhite:[77:31] Found expr:[77:11->77:32] Pexp_apply ...[77:11->77:18] (~age77:20->77:23=...[77:25->77:28]) Completable: CnamedArg(Value[Lib, foo], "", [age]) @@ -549,14 +549,14 @@ Found type for function (~age: int, ~name: string) => string "documentation": null }] -Complete tests/src/Completion.res 82:5 +Complete src/Completion.res 82:5 posCursor:[82:5] posNoWhite:[82:4] Found expr:[80:8->86:1] Pexp_apply ...[80:8->80:15] (~age84:3->84:6=...[84:7->84:8], ~name85:3->85:7=...[85:8->85:10]) Completable: CnamedArg(Value[Lib, foo], "", [age, name]) Found type for function (~age: int, ~name: string) => string [] -Complete tests/src/Completion.res 90:13 +Complete src/Completion.res 90:13 posCursor:[90:13] posNoWhite:[90:12] Found expr:[90:3->93:18] Pexp_send a[90:12->90:13] e:[90:3->90:10] Completable: Cpath Value[someObj]["a"] @@ -568,7 +568,7 @@ Completable: Cpath Value[someObj]["a"] "documentation": null }] -Complete tests/src/Completion.res 95:24 +Complete src/Completion.res 95:24 posCursor:[95:24] posNoWhite:[95:23] Found expr:[95:3->99:6] Pexp_send [95:24->95:24] e:[95:3->95:22] Completable: Cpath Value[nestedObj]["x"]["y"][""] @@ -586,7 +586,7 @@ Completable: Cpath Value[nestedObj]["x"]["y"][""] "documentation": null }] -Complete tests/src/Completion.res 99:7 +Complete src/Completion.res 99:7 posCursor:[99:7] posNoWhite:[99:6] Found expr:[99:3->102:20] Pexp_send a[99:6->99:7] e:[99:3->99:4] Completable: Cpath Value[o]["a"] @@ -598,7 +598,7 @@ Completable: Cpath Value[o]["a"] "documentation": null }] -Complete tests/src/Completion.res 104:17 +Complete src/Completion.res 104:17 posCursor:[104:17] posNoWhite:[104:16] Found expr:[104:3->125:18] Pexp_send [104:17->104:17] e:[104:3->104:15] Completable: Cpath Value[no]["x"]["y"][""] @@ -616,7 +616,7 @@ Completable: Cpath Value[no]["x"]["y"][""] "documentation": null }] -Complete tests/src/Completion.res 110:5 +Complete src/Completion.res 110:5 posCursor:[110:5] posNoWhite:[110:4] Found expr:[110:3->110:5] Pexp_field [110:3->110:4] _:[116:0->110:5] Completable: Cpath Value[r]."" @@ -634,7 +634,7 @@ Completable: Cpath Value[r]."" "documentation": null }] -Complete tests/src/Completion.res 113:24 +Complete src/Completion.res 113:24 posCursor:[113:24] posNoWhite:[113:23] Found expr:[113:3->113:24] Pexp_field [113:3->113:23] _:[116:0->113:24] Completable: Cpath Value[Object, Rec, recordVal]."" @@ -652,7 +652,7 @@ Completable: Cpath Value[Object, Rec, recordVal]."" "documentation": null }] -Complete tests/src/Completion.res 120:7 +Complete src/Completion.res 120:7 posCursor:[120:7] posNoWhite:[120:6] Found expr:[119:11->123:1] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->122:5] posCursor:[120:7] posNoWhite:[120:6] Found expr:[120:5->120:7] @@ -666,7 +666,7 @@ Completable: Cpath Value[my] "documentation": null }] -Complete tests/src/Completion.res 125:18 +Complete src/Completion.res 125:18 posCursor:[125:18] posNoWhite:[125:17] Found expr:[125:3->145:32] Pexp_send [125:18->125:18] e:[125:3->125:16] Completable: Cpath Value[Object, object][""] @@ -684,7 +684,7 @@ Completable: Cpath Value[Object, object][""] "documentation": null }] -Complete tests/src/Completion.res 151:6 +Complete src/Completion.res 151:6 posCursor:[151:6] posNoWhite:[151:5] Found expr:[151:4->151:6] JSX 151:6] > _children:None Completable: Cpath Module[O, ""] @@ -696,7 +696,7 @@ Completable: Cpath Module[O, ""] "documentation": null }] -Complete tests/src/Completion.res 157:8 +Complete src/Completion.res 157:8 posCursor:[157:8] posNoWhite:[157:7] Found expr:[157:3->157:8] Pexp_field [157:3->157:7] _:[165:0->157:8] Completable: Cpath Value[q].aa."" @@ -714,7 +714,7 @@ Completable: Cpath Value[q].aa."" "documentation": null }] -Complete tests/src/Completion.res 159:9 +Complete src/Completion.res 159:9 posCursor:[159:9] posNoWhite:[159:8] Found expr:[159:3->159:9] Pexp_field [159:3->159:7] n:[159:8->159:9] Completable: Cpath Value[q].aa.n @@ -726,7 +726,7 @@ Completable: Cpath Value[q].aa.n "documentation": null }] -Complete tests/src/Completion.res 162:6 +Complete src/Completion.res 162:6 posCursor:[162:6] posNoWhite:[162:5] Found expr:[162:3->162:6] Pexp_construct Lis:[162:3->162:6] None Completable: Cpath Value[Lis] @@ -744,7 +744,7 @@ Completable: Cpath Value[Lis] "documentation": null }] -Complete tests/src/Completion.res 169:16 +Complete src/Completion.res 169:16 posCursor:[169:16] posNoWhite:[169:15] Found expr:[169:4->169:16] JSX 169:16] > _children:None Completable: Cpath Module[WithChildren] @@ -756,7 +756,7 @@ Completable: Cpath Module[WithChildren] "documentation": null }] -Complete tests/src/Completion.res 172:16 +Complete src/Completion.res 172:16 posCursor:[172:16] posNoWhite:[172:15] Found type:[172:12->172:16] Ptyp_constr Js.n:[172:12->172:16] Completable: Cpath Type[Js, n] @@ -780,7 +780,7 @@ Completable: Cpath Type[Js, n] "documentation": {"kind": "markdown", "value": " nullable, value of this type can be either [null] or ['a]\n this type is the same as type [t] in {!Null}\n"} }] -Complete tests/src/Completion.res 174:20 +Complete src/Completion.res 174:20 posCursor:[174:20] posNoWhite:[174:19] Found type:[174:12->174:20] Ptyp_constr ForAuto.:[174:12->174:20] Completable: Cpath Type[ForAuto, ""] @@ -792,7 +792,7 @@ Completable: Cpath Type[ForAuto, ""] "documentation": null }] -Complete tests/src/Completion.res 179:13 +Complete src/Completion.res 179:13 posCursor:[179:13] posNoWhite:[179:12] Found expr:[179:11->179:13] Pexp_construct As:[179:11->179:13] None Completable: Cpath Value[As] @@ -804,7 +804,7 @@ Completable: Cpath Value[As] "documentation": null }] -Complete tests/src/Completion.res 182:17 +Complete src/Completion.res 182:17 Pmod_ident For:[182:14->182:17] Completable: Cpath Module[For] [{ @@ -821,7 +821,7 @@ Completable: Cpath Module[For] "documentation": null }] -Complete tests/src/Completion.res 190:11 +Complete src/Completion.res 190:11 posCursor:[190:11] posNoWhite:[190:10] Found expr:[190:3->190:11] Pexp_ident Private.:[190:3->190:11] Completable: Cpath Value[Private, ""] @@ -833,13 +833,13 @@ Completable: Cpath Value[Private, ""] "documentation": null }] -Complete tests/src/Completion.res 202:6 +Complete src/Completion.res 202:6 posCursor:[202:6] posNoWhite:[202:5] Found expr:[202:3->202:6] Pexp_ident sha:[202:3->202:6] Completable: Cpath Value[sha] [] -Complete tests/src/Completion.res 205:6 +Complete src/Completion.res 205:6 posCursor:[205:6] posNoWhite:[205:5] Found expr:[205:3->205:6] Pexp_ident sha:[205:3->205:6] Completable: Cpath Value[sha] @@ -851,7 +851,7 @@ Completable: Cpath Value[sha] "documentation": null }] -Complete tests/src/Completion.res 208:6 +Complete src/Completion.res 208:6 posCursor:[208:6] posNoWhite:[208:5] Found expr:[208:3->208:6] Pexp_ident sha:[208:3->208:6] Completable: Cpath Value[sha] @@ -863,7 +863,7 @@ Completable: Cpath Value[sha] "documentation": null }] -Complete tests/src/Completion.res 221:22 +Complete src/Completion.res 221:22 posCursor:[221:22] posNoWhite:[221:21] Found expr:[221:3->224:22] Pexp_send [221:22->221:22] e:[221:3->221:20] Completable: Cpath Value[FAO, forAutoObject][""] @@ -881,7 +881,7 @@ Completable: Cpath Value[FAO, forAutoObject][""] "documentation": null }] -Complete tests/src/Completion.res 224:37 +Complete src/Completion.res 224:37 posCursor:[224:37] posNoWhite:[224:36] Found expr:[224:3->224:37] Pexp_field [224:3->224:36] _:[233:0->224:37] Completable: Cpath Value[FAO, forAutoObject]["forAutoLabel"]."" @@ -899,7 +899,7 @@ Completable: Cpath Value[FAO, forAutoObject]["forAutoLabel"]."" "documentation": null }] -Complete tests/src/Completion.res 227:46 +Complete src/Completion.res 227:46 posCursor:[227:46] posNoWhite:[227:45] Found expr:[227:3->0:-1] Completable: Cpath Value[FAO, forAutoObject]["forAutoLabel"].forAuto-> [{ @@ -916,7 +916,7 @@ Completable: Cpath Value[FAO, forAutoObject]["forAutoLabel"].forAuto-> "documentation": null }] -Complete tests/src/Completion.res 230:55 +Complete src/Completion.res 230:55 posCursor:[230:55] posNoWhite:[230:54] Found expr:[230:3->230:55] posCursor:[230:55] posNoWhite:[230:54] Found expr:[230:46->230:55] Pexp_ident ForAuto.a:[230:46->230:55] @@ -935,7 +935,7 @@ Completable: Cpath Value[ForAuto, a] "documentation": null }] -Complete tests/src/Completion.res 234:34 +Complete src/Completion.res 234:34 posCursor:[234:34] posNoWhite:[234:33] Found expr:[234:18->234:36] Pexp_apply ...__ghost__[0:-1->0:-1] (...[234:18->234:32], ...[234:32->234:34]) posCursor:[234:34] posNoWhite:[234:33] Found expr:[234:32->234:34] @@ -949,12 +949,12 @@ Completable: Cpath Value[na] "documentation": null }] -Complete tests/src/Completion.res 237:17 +Complete src/Completion.res 237:17 posCursor:[237:17] posNoWhite:[237:14] Found expr:[237:14->237:22] Completable: Cnone [] -Complete tests/src/Completion.res 243:8 +Complete src/Completion.res 243:8 posCursor:[243:8] posNoWhite:[243:7] Found expr:[241:8->246:1] posCursor:[243:8] posNoWhite:[243:7] Found expr:[242:14->243:8] Pexp_apply ...[243:3->243:4] (...[242:14->242:15], ...[243:5->243:8]) @@ -975,7 +975,7 @@ Completable: Cpath Value[_z]."" "documentation": null }] -Complete tests/src/Completion.res 254:17 +Complete src/Completion.res 254:17 posCursor:[254:17] posNoWhite:[254:16] Found expr:[254:11->254:17] Pexp_construct SomeLo:[254:11->254:17] None Completable: Cpath Value[SomeLo] @@ -987,7 +987,7 @@ Completable: Cpath Value[SomeLo] "documentation": null }] -Complete tests/src/Completion.res 256:29 +Complete src/Completion.res 256:29 posCursor:[256:29] posNoWhite:[256:28] Found type:[256:13->256:29] Ptyp_constr SomeLocalModule.:[256:13->256:29] Completable: Cpath Type[SomeLocalModule, ""] @@ -999,7 +999,7 @@ Completable: Cpath Type[SomeLocalModule, ""] "documentation": null }] -Complete tests/src/Completion.res 261:33 +Complete src/Completion.res 261:33 posCursor:[261:33] posNoWhite:[261:32] Found type:[261:17->263:11] Ptyp_constr SomeLocalModule.:[261:17->263:11] Completable: Cpath Type[SomeLocalModule, ""] @@ -1011,7 +1011,7 @@ Completable: Cpath Type[SomeLocalModule, ""] "documentation": null }] -Complete tests/src/Completion.res 268:21 +Complete src/Completion.res 268:21 Ptype_variant unary SomeLocal:[268:12->268:21] Completable: Cpath Value[SomeLocal] [{ @@ -1028,7 +1028,7 @@ Completable: Cpath Value[SomeLocal] "documentation": null }] -Complete tests/src/Completion.res 271:20 +Complete src/Completion.res 271:20 posCursor:[271:20] posNoWhite:[271:19] Found pattern:[271:7->274:3] posCursor:[271:20] posNoWhite:[271:19] Found type:[271:11->274:3] Ptyp_constr SomeLocal:[271:11->274:3] @@ -1041,7 +1041,7 @@ Completable: Cpath Type[SomeLocal] "documentation": null }] -Complete tests/src/Completion.res 275:15 +Complete src/Completion.res 275:15 posCursor:[275:15] posNoWhite:[275:14] Found expr:[274:11->278:1] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:5->277:3] posCursor:[275:15] posNoWhite:[275:14] Found expr:[275:13->275:15] @@ -1055,7 +1055,7 @@ Completable: Cpath Value[_w] "documentation": null }] -Complete tests/src/Completion.res 281:22 +Complete src/Completion.res 281:22 posCursor:[281:22] posNoWhite:[281:21] Found type:[281:21->281:22] Ptyp_constr s:[281:21->281:22] Completable: Cpath Type[s] @@ -1073,7 +1073,7 @@ Completable: Cpath Type[s] "documentation": null }] -Complete tests/src/Completion.res 291:30 +Complete src/Completion.res 291:30 posCursor:[291:30] posNoWhite:[291:29] Found expr:[291:11->291:32] Pexp_apply ...[291:11->291:28] () Completable: CnamedArg(Value[funRecord].someFun, "", []) @@ -1086,7 +1086,7 @@ Found type for function (~name: string) => unit "documentation": null }] -Complete tests/src/Completion.res 296:11 +Complete src/Completion.res 296:11 posCursor:[296:11] posNoWhite:[296:10] Found expr:[296:3->296:11] Pexp_field [296:3->296:10] _:[299:0->296:11] Completable: Cpath Value[retAA](Nolabel)."" @@ -1104,7 +1104,7 @@ Completable: Cpath Value[retAA](Nolabel)."" "documentation": null }] -Complete tests/src/Completion.res 301:13 +Complete src/Completion.res 301:13 posCursor:[301:13] posNoWhite:[301:12] Found expr:[301:3->301:13] Pexp_apply ...[301:3->301:11] () Completable: CnamedArg(Value[ff](~c), "", []) @@ -1142,7 +1142,7 @@ Found type for function ( "documentation": null }] -Complete tests/src/Completion.res 304:15 +Complete src/Completion.res 304:15 posCursor:[304:15] posNoWhite:[304:14] Found expr:[304:3->304:15] Pexp_apply ...[304:3->304:13] () Completable: CnamedArg(Value[ff](~c)(Nolabel), "", []) @@ -1167,7 +1167,7 @@ Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int "documentation": null }] -Complete tests/src/Completion.res 307:17 +Complete src/Completion.res 307:17 posCursor:[307:17] posNoWhite:[307:16] Found expr:[307:3->307:17] Pexp_apply ...[307:3->307:15] () Completable: CnamedArg(Value[ff](~c, Nolabel), "", []) @@ -1192,7 +1192,7 @@ Found type for function (~a: int, ~b: int, ~opt2: int=?, unit) => int "documentation": null }] -Complete tests/src/Completion.res 310:21 +Complete src/Completion.res 310:21 posCursor:[310:21] posNoWhite:[310:20] Found expr:[310:3->310:21] Pexp_apply ...[310:3->310:19] () Completable: CnamedArg(Value[ff](~c, Nolabel, Nolabel), "", []) @@ -1211,7 +1211,7 @@ Found type for function (~a: int, ~b: int) => int "documentation": null }] -Complete tests/src/Completion.res 313:23 +Complete src/Completion.res 313:23 posCursor:[313:23] posNoWhite:[313:22] Found expr:[313:3->313:23] Pexp_apply ...[313:3->313:21] () Completable: CnamedArg(Value[ff](~c, Nolabel, ~b), "", []) @@ -1230,7 +1230,7 @@ Found type for function (~a: int, ~opt2: int=?, unit) => int "documentation": null }] -Complete tests/src/Completion.res 316:16 +Complete src/Completion.res 316:16 posCursor:[316:16] posNoWhite:[316:15] Found expr:[316:3->316:16] Pexp_apply ...[316:3->316:14] () Completable: CnamedArg(Value[ff](~opt2), "", []) @@ -1261,7 +1261,7 @@ Found type for function (~opt1: int=?, ~a: int, ~b: int, unit, unit, ~c: int) => "documentation": null }] -Complete tests/src/Completion.res 323:17 +Complete src/Completion.res 323:17 posCursor:[323:17] posNoWhite:[323:16] Found expr:[323:3->323:17] Pexp_apply ...[323:3->323:15] () Completable: CnamedArg(Value[withCallback], "", []) @@ -1280,7 +1280,7 @@ Found type for function (~b: int) => callback "documentation": null }] -Complete tests/src/Completion.res 326:21 +Complete src/Completion.res 326:21 posCursor:[326:21] posNoWhite:[326:20] Found expr:[326:3->326:21] Pexp_apply ...[326:3->326:19] () Completable: CnamedArg(Value[withCallback](~a), "", []) @@ -1293,7 +1293,7 @@ Found type for function (~b: int) => int "documentation": null }] -Complete tests/src/Completion.res 329:21 +Complete src/Completion.res 329:21 posCursor:[329:21] posNoWhite:[329:20] Found expr:[329:3->329:21] Pexp_apply ...[329:3->329:19] () Completable: CnamedArg(Value[withCallback](~b), "", []) @@ -1306,7 +1306,7 @@ Found type for function (~a: int) => int "documentation": null }] -Complete tests/src/Completion.res 336:26 +Complete src/Completion.res 336:26 posCursor:[336:26] posNoWhite:[336:25] Found expr:[333:3->346:23] JSX 333:6] onClick[334:4->334:11]=...[334:13->346:23]> _children:None posCursor:[336:26] posNoWhite:[336:25] Found expr:[334:13->346:23] @@ -1331,7 +1331,7 @@ Completable: Cpath Type[Res] "documentation": null }] -Complete tests/src/Completion.res 343:57 +Complete src/Completion.res 343:57 posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:10->346:23] posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:53->346:23] posCursor:[343:57] posNoWhite:[343:56] Found expr:[343:53->343:57] @@ -1345,14 +1345,14 @@ Completable: Cpath Value[this] "documentation": null }] -Hover tests/src/Completion.res 346:14 +Hover src/Completion.res 346:14 Nothing at that position. Now trying to use completion. posCursor:[346:14] posNoWhite:[346:13] Found expr:[346:9->346:23] JSX 346:12] name[346:13->346:17]=...[346:18->346:20]> _children:346:21 Completable: Cjsx([div], name, [name]) {"contents": "```rescript\nstring\n```"} -Hover tests/src/Completion.res 349:17 +Hover src/Completion.res 349:17 Nothing at that position. Now trying to use completion. posCursor:[349:17] posNoWhite:[349:16] Found expr:[349:11->349:35] Pexp_send age[349:30->349:33] e:[349:11->349:28] @@ -1361,7 +1361,7 @@ Pexp_ident FAO.forAutoObject:[349:11->349:28] Completable: Cpath Value[FAO, forAutoObject] {"contents": "```rescript\n{\"age\": int, \"forAutoLabel\": FAR.forAutoRecord}\n```"} -Hover tests/src/Completion.res 352:17 +Hover src/Completion.res 352:17 Nothing at that position. Now trying to use completion. posCursor:[352:17] posNoWhite:[352:16] Found expr:[352:11->352:22] Pexp_apply ...[352:11->352:13] (~opt1352:15->352:19=...[352:20->352:21]) @@ -1377,12 +1377,12 @@ Found type for function ( ) => int {"contents": "```rescript\noption\n```"} -Complete tests/src/Completion.res 355:23 +Complete src/Completion.res 355:23 posCursor:[355:23] posNoWhite:[355:22] Found expr:[0:-1->355:23] posCursor:[355:23] posNoWhite:[355:22] Found expr:[355:12->355:23] [] -Complete tests/src/Completion.res 362:8 +Complete src/Completion.res 362:8 posCursor:[362:8] posNoWhite:[362:7] Found expr:[360:8->365:3] posCursor:[362:8] posNoWhite:[362:7] Found expr:[361:2->365:3] posCursor:[362:8] posNoWhite:[362:7] Found pattern:[362:7->364:5] @@ -1415,7 +1415,7 @@ Completable: Cpath Value[T] "documentation": null }] -Complete tests/src/Completion.res 373:21 +Complete src/Completion.res 373:21 posCursor:[373:21] posNoWhite:[373:20] Found expr:[371:8->376:3] posCursor:[373:21] posNoWhite:[373:20] Found expr:[372:2->376:3] posCursor:[373:21] posNoWhite:[373:20] Found pattern:[373:7->375:5] @@ -1430,7 +1430,7 @@ Completable: Cpath Value[AndThatOther, T] "documentation": null }] -Complete tests/src/Completion.res 378:24 +Complete src/Completion.res 378:24 posCursor:[378:24] posNoWhite:[378:23] Found expr:[378:12->378:26] Pexp_apply ...__ghost__[0:-1->0:-1] (...[378:12->378:16], ...[378:16->378:24]) posCursor:[378:24] posNoWhite:[378:23] Found expr:[378:16->378:24] @@ -1450,7 +1450,7 @@ Completable: Cpath Value[ForAuto, ""] "documentation": null }] -Complete tests/src/Completion.res 381:38 +Complete src/Completion.res 381:38 posCursor:[381:38] posNoWhite:[381:37] Found expr:[381:12->381:41] Pexp_apply ...__ghost__[0:-1->0:-1] (...[381:12->381:19], ...[381:19->381:39]) posCursor:[381:38] posNoWhite:[381:37] Found expr:[381:19->381:39] @@ -1470,7 +1470,7 @@ Completable: Cpath Value[FAO, forAutoObject][""] "documentation": null }] -Complete tests/src/Completion.res 384:24 +Complete src/Completion.res 384:24 posCursor:[384:24] posNoWhite:[384:23] Found expr:[384:11->384:26] Pexp_field [384:14->384:23] _:[384:24->384:24] Completable: Cpath Value[funRecord]."" @@ -1488,7 +1488,7 @@ Completable: Cpath Value[funRecord]."" "documentation": null }] -Complete tests/src/Completion.res 389:12 +Complete src/Completion.res 389:12 posCursor:[389:12] posNoWhite:[389:11] Found expr:[387:8->392:1] posCursor:[389:12] posNoWhite:[389:11] Found expr:[388:2->391:4] posCursor:[389:12] posNoWhite:[389:11] Found expr:[389:6->391:4] diff --git a/analysis/tests/src/expected/CreateInterface.res.txt b/analysis/tests/src/expected/CreateInterface.res.txt index 748413150..bd58124b5 100644 --- a/analysis/tests/src/expected/CreateInterface.res.txt +++ b/analysis/tests/src/expected/CreateInterface.res.txt @@ -1,4 +1,4 @@ -Create Interface tests/src/CreateInterface.res +Create Interface src/CreateInterface.res type r = {name: string, age: int} let add: (~x: int, ~y: int) => int @react.component diff --git a/analysis/tests/src/expected/Cross.res.txt b/analysis/tests/src/expected/Cross.res.txt index f00d1add9..b045e8a02 100644 --- a/analysis/tests/src/expected/Cross.res.txt +++ b/analysis/tests/src/expected/Cross.res.txt @@ -1,4 +1,4 @@ -References tests/src/Cross.res 0:17 +References src/Cross.res 0:17 [ {"uri": "Cross.res", "range": {"start": {"line": 0, "character": 15}, "end": {"line": 0, "character": 25}}}, {"uri": "Cross.res", "range": {"start": {"line": 3, "character": 16}, "end": {"line": 3, "character": 26}}}, @@ -7,7 +7,7 @@ References tests/src/Cross.res 0:17 {"uri": "References.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}} ] -References tests/src/Cross.res 9:31 +References src/Cross.res 9:31 [ {"uri": "Cross.res", "range": {"start": {"line": 9, "character": 28}, "end": {"line": 9, "character": 51}}}, {"uri": "Cross.res", "range": {"start": {"line": 12, "character": 29}, "end": {"line": 12, "character": 52}}}, @@ -17,7 +17,7 @@ References tests/src/Cross.res 9:31 {"uri": "ReferencesWithInterface.resi", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 0}}} ] -Rename tests/src/Cross.res 18:13 RenameWithInterfacePrime +Rename src/Cross.res 18:13 RenameWithInterfacePrime [ { "kind": "rename", @@ -44,7 +44,7 @@ Rename tests/src/Cross.res 18:13 RenameWithInterfacePrime } ] -Rename tests/src/Cross.res 21:28 xPrime +Rename src/Cross.res 21:28 xPrime [ { "textDocument": { @@ -81,19 +81,19 @@ Rename tests/src/Cross.res 21:28 xPrime } ] -TypeDefinition tests/src/Cross.res 24:5 +TypeDefinition src/Cross.res 24:5 {"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} -Definition tests/src/Cross.res 27:32 +Definition src/Cross.res 27:32 {"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} -Definition tests/src/Cross.res 30:36 +Definition src/Cross.res 30:36 {"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 3, "character": 5}, "end": {"line": 3, "character": 6}}} -TypeDefinition tests/src/Cross.res 33:37 +TypeDefinition src/Cross.res 33:37 {"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 3, "character": 0}, "end": {"line": 3, "character": 6}}} -Complete tests/src/Cross.res 36:28 +Complete src/Cross.res 36:28 posCursor:[36:28] posNoWhite:[36:27] Found expr:[36:3->36:28] Pexp_ident DefinitionWithInterface.a:[36:3->36:28] Completable: Cpath Value[DefinitionWithInterface, a] diff --git a/analysis/tests/src/expected/Debug.res.txt b/analysis/tests/src/expected/Debug.res.txt index 562cc8aaa..dcec44d1a 100644 --- a/analysis/tests/src/expected/Debug.res.txt +++ b/analysis/tests/src/expected/Debug.res.txt @@ -1,48 +1,48 @@ -Definition tests/src/Debug.res 1:20 +Definition src/Debug.res 1:20 Dependencies: @rescript/react -Source directories: tests/node_modules/@rescript/react/src tests/node_modules/@rescript/react/src/legacy -Source files: tests/node_modules/@rescript/react/src/React.res tests/node_modules/@rescript/react/src/ReactDOM.res tests/node_modules/@rescript/react/src/ReactDOMServer.res tests/node_modules/@rescript/react/src/ReactDOMStyle.res tests/node_modules/@rescript/react/src/ReactEvent.res tests/node_modules/@rescript/react/src/ReactEvent.resi tests/node_modules/@rescript/react/src/ReactTestUtils.res tests/node_modules/@rescript/react/src/ReactTestUtils.resi tests/node_modules/@rescript/react/src/RescriptReactErrorBoundary.res tests/node_modules/@rescript/react/src/RescriptReactErrorBoundary.resi tests/node_modules/@rescript/react/src/RescriptReactRouter.res tests/node_modules/@rescript/react/src/RescriptReactRouter.resi tests/node_modules/@rescript/react/src/legacy/ReactDOMRe.res tests/node_modules/@rescript/react/src/legacy/ReasonReact.res -Source directories: tests/src tests/src/expected -Source files: tests/src/Auto.res tests/src/CompletePrioritize1.res tests/src/CompletePrioritize2.res tests/src/Completion.res tests/src/Component.res tests/src/Component.resi tests/src/CreateInterface.res tests/src/Cross.res tests/src/Debug.res tests/src/Definition.res tests/src/DefinitionWithInterface.res tests/src/DefinitionWithInterface.resi tests/src/Div.res tests/src/DocumentSymbol.res tests/src/Fragment.res tests/src/Highlight.res tests/src/Hover.res tests/src/Jsx.res tests/src/Jsx.resi tests/src/LongIdentTest.res tests/src/Object.res tests/src/Patterns.res tests/src/RecModules.res tests/src/RecordCompletion.res tests/src/RecoveryOnProp.res tests/src/References.res tests/src/ReferencesWithInterface.res tests/src/ReferencesWithInterface.resi tests/src/Rename.res tests/src/RenameWithInterface.res tests/src/RenameWithInterface.resi tests/src/TableclothMap.ml tests/src/TableclothMap.mli tests/src/TypeDefinition.res tests/src/Xform.res -Impl cmt:tests/lib/bs/src/Auto.cmt res:tests/src/Auto.res -Impl cmt:tests/lib/bs/src/CompletePrioritize1.cmt res:tests/src/CompletePrioritize1.res -Impl cmt:tests/lib/bs/src/CompletePrioritize2.cmt res:tests/src/CompletePrioritize2.res -Impl cmt:tests/lib/bs/src/Completion.cmt res:tests/src/Completion.res -IntfAndImpl cmti:tests/lib/bs/src/Component.cmti resi:tests/src/Component.resi cmt:tests/lib/bs/src/Component.cmt res:tests/src/Component.res -Impl cmt:tests/lib/bs/src/CreateInterface.cmt res:tests/src/CreateInterface.res -Impl cmt:tests/lib/bs/src/Cross.cmt res:tests/src/Cross.res -Impl cmt:tests/lib/bs/src/Debug.cmt res:tests/src/Debug.res -Impl cmt:tests/lib/bs/src/Definition.cmt res:tests/src/Definition.res -IntfAndImpl cmti:tests/lib/bs/src/DefinitionWithInterface.cmti resi:tests/src/DefinitionWithInterface.resi cmt:tests/lib/bs/src/DefinitionWithInterface.cmt res:tests/src/DefinitionWithInterface.res -Impl cmt:tests/lib/bs/src/Div.cmt res:tests/src/Div.res -Impl cmt:tests/lib/bs/src/DocumentSymbol.cmt res:tests/src/DocumentSymbol.res -Impl cmt:tests/lib/bs/src/Fragment.cmt res:tests/src/Fragment.res -Impl cmt:tests/lib/bs/src/Highlight.cmt res:tests/src/Highlight.res -Impl cmt:tests/lib/bs/src/Hover.cmt res:tests/src/Hover.res -IntfAndImpl cmti:tests/lib/bs/src/Jsx.cmti resi:tests/src/Jsx.resi cmt:tests/lib/bs/src/Jsx.cmt res:tests/src/Jsx.res -Impl cmt:tests/lib/bs/src/LongIdentTest.cmt res:tests/src/LongIdentTest.res -Impl cmt:tests/lib/bs/src/Object.cmt res:tests/src/Object.res -Impl cmt:tests/lib/bs/src/Patterns.cmt res:tests/src/Patterns.res -Impl cmt:tests/lib/bs/src/RecModules.cmt res:tests/src/RecModules.res -Impl cmt:tests/lib/bs/src/RecordCompletion.cmt res:tests/src/RecordCompletion.res -Impl cmt:tests/lib/bs/src/RecoveryOnProp.cmt res:tests/src/RecoveryOnProp.res -Impl cmt:tests/lib/bs/src/References.cmt res:tests/src/References.res -IntfAndImpl cmti:tests/lib/bs/src/ReferencesWithInterface.cmti resi:tests/src/ReferencesWithInterface.resi cmt:tests/lib/bs/src/ReferencesWithInterface.cmt res:tests/src/ReferencesWithInterface.res -Impl cmt:tests/lib/bs/src/Rename.cmt res:tests/src/Rename.res -IntfAndImpl cmti:tests/lib/bs/src/RenameWithInterface.cmti resi:tests/src/RenameWithInterface.resi cmt:tests/lib/bs/src/RenameWithInterface.cmt res:tests/src/RenameWithInterface.res -IntfAndImpl cmti:tests/lib/bs/src/TableclothMap.cmti resi:tests/src/TableclothMap.mli cmt:tests/lib/bs/src/TableclothMap.cmt res:tests/src/TableclothMap.ml -Impl cmt:tests/lib/bs/src/TypeDefinition.cmt res:tests/src/TypeDefinition.res -Impl cmt:tests/lib/bs/src/Xform.cmt res:tests/src/Xform.res -Dependency dirs: tests/node_modules/@rescript/react/lib/bs/src tests/node_modules/@rescript/react/lib/bs/src/legacy +Source directories: ./node_modules/@rescript/react/src ./node_modules/@rescript/react/src/legacy +Source files: ./node_modules/@rescript/react/src/React.res ./node_modules/@rescript/react/src/ReactDOM.res ./node_modules/@rescript/react/src/ReactDOMServer.res ./node_modules/@rescript/react/src/ReactDOMStyle.res ./node_modules/@rescript/react/src/ReactEvent.res ./node_modules/@rescript/react/src/ReactEvent.resi ./node_modules/@rescript/react/src/ReactTestUtils.res ./node_modules/@rescript/react/src/ReactTestUtils.resi ./node_modules/@rescript/react/src/RescriptReactErrorBoundary.res ./node_modules/@rescript/react/src/RescriptReactErrorBoundary.resi ./node_modules/@rescript/react/src/RescriptReactRouter.res ./node_modules/@rescript/react/src/RescriptReactRouter.resi ./node_modules/@rescript/react/src/legacy/ReactDOMRe.res ./node_modules/@rescript/react/src/legacy/ReasonReact.res +Source directories: ./src ./src/expected +Source files: ./src/Auto.res ./src/CompletePrioritize1.res ./src/CompletePrioritize2.res ./src/Completion.res ./src/Component.res ./src/Component.resi ./src/CreateInterface.res ./src/Cross.res ./src/Debug.res ./src/Definition.res ./src/DefinitionWithInterface.res ./src/DefinitionWithInterface.resi ./src/Div.res ./src/DocumentSymbol.res ./src/Fragment.res ./src/Highlight.res ./src/Hover.res ./src/Jsx.res ./src/Jsx.resi ./src/LongIdentTest.res ./src/Object.res ./src/Patterns.res ./src/RecModules.res ./src/RecordCompletion.res ./src/RecoveryOnProp.res ./src/References.res ./src/ReferencesWithInterface.res ./src/ReferencesWithInterface.resi ./src/Rename.res ./src/RenameWithInterface.res ./src/RenameWithInterface.resi ./src/TableclothMap.ml ./src/TableclothMap.mli ./src/TypeDefinition.res ./src/Xform.res +Impl cmt:./lib/bs/src/Auto.cmt res:./src/Auto.res +Impl cmt:./lib/bs/src/CompletePrioritize1.cmt res:./src/CompletePrioritize1.res +Impl cmt:./lib/bs/src/CompletePrioritize2.cmt res:./src/CompletePrioritize2.res +Impl cmt:./lib/bs/src/Completion.cmt res:./src/Completion.res +IntfAndImpl cmti:./lib/bs/src/Component.cmti resi:./src/Component.resi cmt:./lib/bs/src/Component.cmt res:./src/Component.res +Impl cmt:./lib/bs/src/CreateInterface.cmt res:./src/CreateInterface.res +Impl cmt:./lib/bs/src/Cross.cmt res:./src/Cross.res +Impl cmt:./lib/bs/src/Debug.cmt res:./src/Debug.res +Impl cmt:./lib/bs/src/Definition.cmt res:./src/Definition.res +IntfAndImpl cmti:./lib/bs/src/DefinitionWithInterface.cmti resi:./src/DefinitionWithInterface.resi cmt:./lib/bs/src/DefinitionWithInterface.cmt res:./src/DefinitionWithInterface.res +Impl cmt:./lib/bs/src/Div.cmt res:./src/Div.res +Impl cmt:./lib/bs/src/DocumentSymbol.cmt res:./src/DocumentSymbol.res +Impl cmt:./lib/bs/src/Fragment.cmt res:./src/Fragment.res +Impl cmt:./lib/bs/src/Highlight.cmt res:./src/Highlight.res +Impl cmt:./lib/bs/src/Hover.cmt res:./src/Hover.res +IntfAndImpl cmti:./lib/bs/src/Jsx.cmti resi:./src/Jsx.resi cmt:./lib/bs/src/Jsx.cmt res:./src/Jsx.res +Impl cmt:./lib/bs/src/LongIdentTest.cmt res:./src/LongIdentTest.res +Impl cmt:./lib/bs/src/Object.cmt res:./src/Object.res +Impl cmt:./lib/bs/src/Patterns.cmt res:./src/Patterns.res +Impl cmt:./lib/bs/src/RecModules.cmt res:./src/RecModules.res +Impl cmt:./lib/bs/src/RecordCompletion.cmt res:./src/RecordCompletion.res +Impl cmt:./lib/bs/src/RecoveryOnProp.cmt res:./src/RecoveryOnProp.res +Impl cmt:./lib/bs/src/References.cmt res:./src/References.res +IntfAndImpl cmti:./lib/bs/src/ReferencesWithInterface.cmti resi:./src/ReferencesWithInterface.resi cmt:./lib/bs/src/ReferencesWithInterface.cmt res:./src/ReferencesWithInterface.res +Impl cmt:./lib/bs/src/Rename.cmt res:./src/Rename.res +IntfAndImpl cmti:./lib/bs/src/RenameWithInterface.cmti resi:./src/RenameWithInterface.resi cmt:./lib/bs/src/RenameWithInterface.cmt res:./src/RenameWithInterface.res +IntfAndImpl cmti:./lib/bs/src/TableclothMap.cmti resi:./src/TableclothMap.mli cmt:./lib/bs/src/TableclothMap.cmt res:./src/TableclothMap.ml +Impl cmt:./lib/bs/src/TypeDefinition.cmt res:./src/TypeDefinition.res +Impl cmt:./lib/bs/src/Xform.cmt res:./src/Xform.res +Dependency dirs: ./node_modules/@rescript/react/lib/bs/src ./node_modules/@rescript/react/lib/bs/src/legacy Opens from bsconfig: locItems: 1:18-1:21 Typed map (Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b> GlobalReference [ref] Typed GlobalReference moduleName:Belt path:List.map tip:Value -fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/belt.cmt res:tests/node_modules/rescript/lib/ocaml/belt.ml +fileForModule Impl cmt:./node_modules/rescript/lib/ocaml/belt.cmt res:./node_modules/rescript/lib/ocaml/belt.ml resolvePath path:List.map resolvePath Global path:map module:Belt_List -fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/belt_List.cmti res:tests/node_modules/rescript/lib/ocaml/belt_List.mli +fileForModule Impl cmt:./node_modules/rescript/lib/ocaml/belt_List.cmti res:./node_modules/rescript/lib/ocaml/belt_List.mli resolvePath path:map [ref] resolved path:map [ref] Got stamp 1024 @@ -50,11 +50,11 @@ resolvePath path:map [ref] Inner uri belt_List.mli {"uri": "belt_List.mli", "range": {"start": {"line": 239, "character": 4}, "end": {"line": 239, "character": 7}}} -Definition tests/src/Debug.res 4:14 +Definition src/Debug.res 4:14 locItems: 4:13-4:16 Typed map ('a => 'b, list<'a>) => list<'b> GlobalReference [ref] Typed GlobalReference moduleName:List path:map tip:Value -fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/list.cmti res:tests/node_modules/rescript/lib/ocaml/list.mli +fileForModule Impl cmt:./node_modules/rescript/lib/ocaml/list.cmti res:./node_modules/rescript/lib/ocaml/list.mli resolvePath path:map [ref] resolved path:map [ref] Got stamp 1018 @@ -62,7 +62,7 @@ resolvePath path:map [ref] Inner uri list.mli {"uri": "list.mli", "range": {"start": {"line": 116, "character": 4}, "end": {"line": 116, "character": 7}}} -Complete tests/src/Debug.res 13:8 +Complete src/Debug.res 13:8 posCursor:[13:8] posNoWhite:[13:7] Found expr:[13:5->13:8] Pexp_ident eqN:[13:5->13:8] Completable: Cpath Value[eqN] @@ -71,7 +71,7 @@ Package opens resolving open Js.place holder resolvePath path:Js.place holder Not local -fileForModule Impl cmt:tests/node_modules/rescript/lib/ocaml/js.cmt res:tests/node_modules/rescript/lib/ocaml/js.ml +fileForModule Impl cmt:./node_modules/rescript/lib/ocaml/js.cmt res:./node_modules/rescript/lib/ocaml/js.ml resolvePath path:place holder Resolved opens 1 js.ml findLocalCompletionsWithOpens uri:Debug.res pos:13:8 diff --git a/analysis/tests/src/expected/Definition.res.txt b/analysis/tests/src/expected/Definition.res.txt index a1a4fdb07..afb6df034 100644 --- a/analysis/tests/src/expected/Definition.res.txt +++ b/analysis/tests/src/expected/Definition.res.txt @@ -1,18 +1,18 @@ -Definition tests/src/Definition.res 2:8 +Definition src/Definition.res 2:8 {"uri": "Definition.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 6}}} -Definition tests/src/Definition.res 10:23 +Definition src/Definition.res 10:23 {"uri": "Definition.res", "range": {"start": {"line": 6, "character": 7}, "end": {"line": 6, "character": 13}}} -Hover tests/src/Definition.res 14:14 +Hover src/Definition.res 14:14 {"contents": "```rescript\n('a => 'b, list<'a>) => list<'b>\n```\n\n [List.map f [a1; ...; an]] applies function [f] to [a1, ..., an],\n and builds the list [[f a1; ...; f an]]\n with the results returned by [f]. Not tail-recursive. "} -Hover tests/src/Definition.res 18:14 +Hover src/Definition.res 18:14 {"contents": "```rescript\n(Belt.List.t<'a>, 'a => 'b) => Belt.List.t<'b>\n```\n\n\n `map xs f`\n\n **return** the list obtained by applying `f` to each element of `xs`\n\n ```\n map [1;2] (fun x-> x + 1) = [3;4]\n ```\n"} -Hover tests/src/Definition.res 23:3 +Hover src/Definition.res 23:3 {"contents": "```rescript\n(. int, int) => int\n```"} -Definition tests/src/Definition.res 26:3 +Definition src/Definition.res 26:3 {"uri": "Definition.res", "range": {"start": {"line": 21, "character": 4}, "end": {"line": 21, "character": 13}}} diff --git a/analysis/tests/src/expected/DefinitionWithInterface.res.txt b/analysis/tests/src/expected/DefinitionWithInterface.res.txt index 9fef856d6..a133d7fbf 100644 --- a/analysis/tests/src/expected/DefinitionWithInterface.res.txt +++ b/analysis/tests/src/expected/DefinitionWithInterface.res.txt @@ -1,3 +1,3 @@ -Definition tests/src/DefinitionWithInterface.res 0:4 +Definition src/DefinitionWithInterface.res 0:4 {"uri": "DefinitionWithInterface.resi", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} diff --git a/analysis/tests/src/expected/DefinitionWithInterface.resi.txt b/analysis/tests/src/expected/DefinitionWithInterface.resi.txt index 60c8ac515..256702cc6 100644 --- a/analysis/tests/src/expected/DefinitionWithInterface.resi.txt +++ b/analysis/tests/src/expected/DefinitionWithInterface.resi.txt @@ -1,3 +1,3 @@ -Definition tests/src/DefinitionWithInterface.resi 0:4 +Definition src/DefinitionWithInterface.resi 0:4 {"uri": "DefinitionWithInterface.res", "range": {"start": {"line": 0, "character": 4}, "end": {"line": 0, "character": 5}}} diff --git a/analysis/tests/src/expected/Div.res.txt b/analysis/tests/src/expected/Div.res.txt index d79235bf9..6cf9a26d4 100644 --- a/analysis/tests/src/expected/Div.res.txt +++ b/analysis/tests/src/expected/Div.res.txt @@ -1,7 +1,7 @@ -Hover tests/src/Div.res 0:10 +Hover src/Div.res 0:10 {"contents": "```rescript\n(\n string,\n ~props: ReactDOMRe.domProps=?,\n array,\n) => React.element\n```"} -Complete tests/src/Div.res 3:17 +Complete src/Div.res 3:17 posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:4->3:17] JSX 3:7] dangerous[3:8->3:17]=...[3:8->3:17]> _children:None Completable: Cjsx([div], dangerous, [dangerous]) diff --git a/analysis/tests/src/expected/DocumentSymbol.res.txt b/analysis/tests/src/expected/DocumentSymbol.res.txt index 995a718a9..a61675dc1 100644 --- a/analysis/tests/src/expected/DocumentSymbol.res.txt +++ b/analysis/tests/src/expected/DocumentSymbol.res.txt @@ -1,4 +1,4 @@ -DocumentSymbol tests/src/DocumentSymbol.res +DocumentSymbol src/DocumentSymbol.res [ { "name": "MyList", diff --git a/analysis/tests/src/expected/Fragment.res.txt b/analysis/tests/src/expected/Fragment.res.txt index 3b8f323b8..49995e110 100644 --- a/analysis/tests/src/expected/Fragment.res.txt +++ b/analysis/tests/src/expected/Fragment.res.txt @@ -1,7 +1,7 @@ -Hover tests/src/Fragment.res 6:19 +Hover src/Fragment.res 6:19 {"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n```rescript\ntype component<'props> = componentLike<'props, element>\n```"} -Hover tests/src/Fragment.res 9:56 +Hover src/Fragment.res 9:56 Nothing at that position. Now trying to use completion. posCursor:[9:56] posNoWhite:[9:55] Found expr:[9:10->9:67] Pexp_construct :::[9:13->9:67] [9:13->9:67] diff --git a/analysis/tests/src/expected/Highlight.res.txt b/analysis/tests/src/expected/Highlight.res.txt index ed6a39136..0e88a0c17 100644 --- a/analysis/tests/src/expected/Highlight.res.txt +++ b/analysis/tests/src/expected/Highlight.res.txt @@ -1,4 +1,4 @@ -Highlight tests/src/Highlight.res +Highlight src/Highlight.res structure items:38 diagnostics:0 Lident: M 0:7 Class Lident: C 1:9 Class diff --git a/analysis/tests/src/expected/Hover.res.txt b/analysis/tests/src/expected/Hover.res.txt index afc35fb6a..9d9c0616e 100644 --- a/analysis/tests/src/expected/Hover.res.txt +++ b/analysis/tests/src/expected/Hover.res.txt @@ -1,84 +1,84 @@ -Hover tests/src/Hover.res 0:4 +Hover src/Hover.res 0:4 {"contents": "```rescript\nint\n```"} -Hover tests/src/Hover.res 3:5 +Hover src/Hover.res 3:5 {"contents": "```rescript\ntype t = (int, float)\n```"} -Hover tests/src/Hover.res 6:7 +Hover src/Hover.res 6:7 {"contents": "```rescript\nmodule Id = {\n type x = int\n}\n```"} -Hover tests/src/Hover.res 19:11 +Hover src/Hover.res 19:11 {"contents": "\nThis module is commented\n```rescript\nmodule Dep = {\n let customDouble: int => int\n}\n```"} -Hover tests/src/Hover.res 22:11 +Hover src/Hover.res 22:11 {"contents": "```rescript\nint => int\n```\n\nSome doc comment"} -Hover tests/src/Hover.res 26:6 +Hover src/Hover.res 26:6 {"contents": "```rescript\nint\n```"} -Hover tests/src/Hover.res 33:4 +Hover src/Hover.res 33:4 {"contents": "```rescript\nunit => int\n```\n\nDoc comment for functionWithTypeAnnotation"} -Hover tests/src/Hover.res 37:13 +Hover src/Hover.res 37:13 {"contents": "```rescript\nstring\n```"} -Hover tests/src/Hover.res 41:13 +Hover src/Hover.res 41:13 {"contents": "```rescript\nstring\n```"} -Hover tests/src/Hover.res 44:10 +Hover src/Hover.res 44:10 {"contents": "```rescript\nint\n```"} -Hover tests/src/Hover.res 47:13 +Hover src/Hover.res 47:13 {"contents": "```rescript\nmodule Logger = {\n let log: string => unit\n}\n```"} -Hover tests/src/Hover.res 52:7 +Hover src/Hover.res 52:7 {"contents": "```rescript\nmodule Logger = {\n let log: string => unit\n}\n```"} -Definition tests/src/Hover.res 58:14 +Definition src/Hover.res 58:14 {"uri": "Hover.res", "range": {"start": {"line": 47, "character": 12}, "end": {"line": 47, "character": 18}}} -Hover tests/src/Hover.res 61:9 +Hover src/Hover.res 61:9 {"contents": "```rescript\nmodule IdDefinedTwice = {\n let y: int\n let _x: int\n}\n```"} -Hover tests/src/Hover.res 72:7 +Hover src/Hover.res 72:7 {"contents": "```rescript\nmodule A = {\n let x: int\n}\n```"} -Hover tests/src/Hover.res 75:7 +Hover src/Hover.res 75:7 {"contents": "```rescript\nmodule A = {\n let x: int\n}\n```"} -Hover tests/src/Hover.res 85:10 +Hover src/Hover.res 85:10 {"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n```rescript\ntype component<'props> = componentLike<'props, element>\n```"} -Hover tests/src/Hover.res 88:10 +Hover src/Hover.res 88:10 {"contents": "```rescript\nReact.component<{\"children\": React.element}>\n```\n\n```rescript\ntype component<'props> = componentLike<'props, element>\n```"} -Hover tests/src/Hover.res 93:25 +Hover src/Hover.res 93:25 {"contents": "```rescript\nfloat\n```"} -Hover tests/src/Hover.res 96:21 +Hover src/Hover.res 96:21 {"contents": "```rescript\nint\n```"} -Hover tests/src/Hover.res 106:16 +Hover src/Hover.res 106:16 {"contents": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```"} -Hover tests/src/Hover.res 109:25 +Hover src/Hover.res 109:25 {"contents": "```rescript\nAA.cond<[< #str(string)]> => AA.cond<[< #str(string)]>\n```"} -Hover tests/src/Hover.res 112:3 +Hover src/Hover.res 112:3 Nothing at that position. Now trying to use completion. Attribute id:live:[112:0->112:5] label:live Completable: Cdecorator(live) {"contents": "The `@live` decorator is for reanalyze, a static analysis tool for ReScript that can do dead code analysis.\n\n`@live` tells the dead code analysis that the value should be considered live, even though it might appear to be dead. This is typically used in case of FFI where there are indirect ways to access values. It can be added to everything that could otherwise be considered unused by the dead code analysis - values, functions, arguments, records, individual record fields, and so on.\n\n[Read more and see examples in the documentation](https://rescript-lang.org/syntax-lookup#live-decorator).\n\nHint: Did you know you can run an interactive code analysis in your project by running the command `> ReScript: Start Code Analyzer`? Try it!"} -Hover tests/src/Hover.res 115:4 +Hover src/Hover.res 115:4 {"contents": "```rescript\n(.) => unit => int\n```"} -Hover tests/src/Hover.res 121:4 +Hover src/Hover.res 121:4 {"contents": "```rescript\n(.) => (.) => int\n```"} -Hover tests/src/Hover.res 124:4 +Hover src/Hover.res 124:4 {"contents": "```rescript\n(. unit, unit) => int\n```"} -Hover tests/src/Hover.res 127:5 +Hover src/Hover.res 127:5 {"contents": "```rescript\n(.) => unit => int\n```"} diff --git a/analysis/tests/src/expected/Jsx.res.txt b/analysis/tests/src/expected/Jsx.res.txt index 5cb54a650..c2d3c0a1a 100644 --- a/analysis/tests/src/expected/Jsx.res.txt +++ b/analysis/tests/src/expected/Jsx.res.txt @@ -1,7 +1,7 @@ -Definition tests/src/Jsx.res 5:9 +Definition src/Jsx.res 5:9 {"uri": "Jsx.res", "range": {"start": {"line": 2, "character": 6}, "end": {"line": 2, "character": 10}}} -Complete tests/src/Jsx.res 8:15 +Complete src/Jsx.res 8:15 posCursor:[8:15] posNoWhite:[8:14] Found expr:[8:4->8:15] JSX 8:5] second[8:6->8:12]=...[8:13->8:15]> _children:None posCursor:[8:15] posNoWhite:[8:14] Found expr:[8:13->8:15] @@ -9,7 +9,7 @@ Pexp_ident fi:[8:13->8:15] Completable: Cpath Value[fi] [] -Complete tests/src/Jsx.res 11:20 +Complete src/Jsx.res 11:20 posCursor:[11:20] posNoWhite:[11:19] Found expr:[11:4->11:20] JSX 11:5] second[11:6->11:12]=...[11:13->11:18] f[11:19->11:20]=...[11:19->11:20]> _children:None Completable: Cjsx([M], f, [second, f]) @@ -27,7 +27,7 @@ Completable: Cjsx([M], f, [second, f]) "documentation": null }] -Complete tests/src/Jsx.res 14:13 +Complete src/Jsx.res 14:13 posCursor:[14:13] posNoWhite:[14:12] Found expr:[14:12->14:13] JSX 14:13] > _children:None Completable: Cpath Module[M] @@ -51,7 +51,7 @@ Completable: Cpath Module[M] "documentation": null }] -Complete tests/src/Jsx.res 22:19 +Complete src/Jsx.res 22:19 posCursor:[22:19] posNoWhite:[22:18] Found expr:[22:4->22:19] JSX 22:5] prop[22:6->22:10]=...[22:12->22:16] k[22:18->22:19]=...[22:18->22:19]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -63,7 +63,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 25:17 +Complete src/Jsx.res 25:17 posCursor:[25:17] posNoWhite:[25:16] Found expr:[25:4->25:17] JSX 25:5] prop[25:6->25:10]=...[25:11->25:15] k[25:16->25:17]=...[25:16->25:17]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -75,7 +75,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 28:21 +Complete src/Jsx.res 28:21 posCursor:[28:21] posNoWhite:[28:20] Found expr:[28:4->28:21] JSX 28:5] prop[28:6->28:10]=...[28:11->28:19] k[28:20->28:21]=...[28:20->28:21]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -87,7 +87,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 31:24 +Complete src/Jsx.res 31:24 posCursor:[31:24] posNoWhite:[31:23] Found expr:[31:4->31:24] JSX 31:5] prop[31:6->31:10]=...[31:11->31:22] k[31:23->31:24]=...[31:23->31:24]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -99,7 +99,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 34:18 +Complete src/Jsx.res 34:18 posCursor:[34:18] posNoWhite:[34:17] Found expr:[34:4->34:18] JSX 34:5] prop[34:6->34:10]=...[34:12->34:16] k[34:17->34:18]=...[34:17->34:18]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -111,7 +111,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 37:16 +Complete src/Jsx.res 37:16 posCursor:[37:16] posNoWhite:[37:15] Found expr:[37:4->37:16] JSX 37:5] prop[37:6->37:10]=...[37:11->37:14] k[37:15->37:16]=...[37:15->37:16]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -123,7 +123,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 40:17 +Complete src/Jsx.res 40:17 posCursor:[40:17] posNoWhite:[40:16] Found expr:[40:4->40:17] JSX 40:5] prop[40:6->40:10]=...[40:11->40:15] k[40:16->40:17]=...[40:16->40:17]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -135,7 +135,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 43:18 +Complete src/Jsx.res 43:18 posCursor:[43:18] posNoWhite:[43:17] Found expr:[43:4->43:18] JSX 43:5] prop[43:6->43:10]=...[43:11->43:16] k[43:17->43:18]=...[43:17->43:18]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -147,7 +147,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 46:16 +Complete src/Jsx.res 46:16 posCursor:[46:16] posNoWhite:[46:15] Found expr:[46:4->46:16] JSX 46:5] prop[46:6->46:10]=...[46:11->46:14] k[46:15->46:16]=...[46:15->46:16]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -159,7 +159,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 49:27 +Complete src/Jsx.res 49:27 posCursor:[49:27] posNoWhite:[49:26] Found expr:[49:4->49:27] JSX 49:5] prop[49:6->49:10]=...[49:11->49:25] k[49:26->49:27]=...[49:26->49:27]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -171,7 +171,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 52:38 +Complete src/Jsx.res 52:38 posCursor:[52:38] posNoWhite:[52:37] Found expr:[52:4->52:38] JSX 52:5] prop[52:6->52:10]=...[52:11->52:36] k[52:37->52:38]=...[52:37->52:38]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -183,7 +183,7 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Complete tests/src/Jsx.res 55:25 +Complete src/Jsx.res 55:25 posCursor:[55:25] posNoWhite:[55:24] Found expr:[55:4->55:25] JSX 55:5] prop[55:6->55:10]=...[55:11->55:23] k[55:24->55:25]=...[55:24->55:25]> _children:None Completable: Cjsx([M], k, [prop, k]) @@ -195,10 +195,10 @@ Completable: Cjsx([M], k, [prop, k]) "documentation": null }] -Definition tests/src/Jsx.res 58:11 +Definition src/Jsx.res 58:11 {"uri": "Component.res", "range": {"start": {"line": 1, "character": 4}, "end": {"line": 1, "character": 8}}} -Complete tests/src/Jsx.res 68:10 +Complete src/Jsx.res 68:10 posCursor:[68:10] posNoWhite:[68:9] Found expr:[68:4->68:10] JSX 68:7] al[68:8->68:10]=...[68:8->68:10]> _children:None Completable: Cjsx([Ext], al, [al]) @@ -210,13 +210,13 @@ Completable: Cjsx([Ext], al, [al]) "documentation": null }] -Complete tests/src/Jsx.res 71:11 +Complete src/Jsx.res 71:11 posCursor:[71:11] posNoWhite:[71:10] Found expr:[71:4->71:11] JSX 71:5] first[71:6->71:11]=...[71:6->71:11]> _children:None Completable: Cjsx([M], first, [first]) [] -Complete tests/src/Jsx.res 74:16 +Complete src/Jsx.res 74:16 posCursor:[74:16] posNoWhite:[74:15] Found expr:[74:4->74:16] JSX 74:5] first[74:6->74:11]=...[74:12->74:14] k[74:15->74:16]=...[74:15->74:16]> _children:None Completable: Cjsx([M], k, [first, k]) @@ -228,7 +228,7 @@ Completable: Cjsx([M], k, [first, k]) "documentation": null }] -Complete tests/src/Jsx.res 77:23 +Complete src/Jsx.res 77:23 posCursor:[77:23] posNoWhite:[77:22] Found expr:[77:4->77:23] JSX 77:5] first[77:6->77:11]=...[77:19->77:21] k[77:22->77:23]=...[77:22->77:23]> _children:None Completable: Cjsx([M], k, [first, k]) @@ -240,7 +240,7 @@ Completable: Cjsx([M], k, [first, k]) "documentation": null }] -Complete tests/src/Jsx.res 80:6 +Complete src/Jsx.res 80:6 posCursor:[80:6] posNoWhite:[80:5] Found expr:[80:4->85:69] Pexp_apply ...[83:20->83:21] (...[80:4->83:19], ...[84:2->85:69]) posCursor:[80:6] posNoWhite:[80:5] Found expr:[80:4->83:19] @@ -251,7 +251,7 @@ posCursor:[80:6] posNoWhite:[80:5] Found expr:__ghost__[80:5->83:20] Pexp_construct []:__ghost__[80:5->83:20] None [] -Complete tests/src/Jsx.res 89:16 +Complete src/Jsx.res 89:16 posCursor:[89:16] posNoWhite:[89:15] Found expr:[89:4->89:16] JSX 89:16] > _children:None Completable: Cpath Module[WithChildren] @@ -263,7 +263,7 @@ Completable: Cpath Module[WithChildren] "documentation": null }] -Complete tests/src/Jsx.res 91:18 +Complete src/Jsx.res 91:18 posCursor:[91:18] posNoWhite:[91:17] Found expr:[91:4->91:18] JSX 91:16] n[91:17->91:18]=...[91:17->91:18]> _children:None Completable: Cjsx([WithChildren], n, [n]) @@ -275,7 +275,7 @@ Completable: Cjsx([WithChildren], n, [n]) "documentation": null }] -Complete tests/src/Jsx.res 94:18 +Complete src/Jsx.res 94:18 posCursor:[94:18] posNoWhite:[94:17] Found pattern:[94:7->94:18] posCursor:[94:18] posNoWhite:[94:17] Found type:[94:11->94:18] Ptyp_constr React.e:[94:11->94:18] @@ -288,7 +288,7 @@ Completable: Cpath Type[React, e] "documentation": null }] -Complete tests/src/Jsx.res 96:20 +Complete src/Jsx.res 96:20 posCursor:[96:20] posNoWhite:[96:19] Found pattern:[96:7->99:6] posCursor:[96:20] posNoWhite:[96:19] Found type:[96:11->99:6] Ptyp_constr ReactDOMR:[96:11->99:6] @@ -301,7 +301,7 @@ Completable: Cpath Type[ReactDOMR] "documentation": null }] -Complete tests/src/Jsx.res 102:21 +Complete src/Jsx.res 102:21 posCursor:[102:21] posNoWhite:[102:20] Found expr:[102:13->102:21] Pexp_apply ...[102:15->102:16] (...[102:13->102:14], ...[102:17->102:21]) posCursor:[102:21] posNoWhite:[102:20] Found expr:[102:17->102:21] @@ -309,7 +309,7 @@ Pexp_field [102:17->102:18] th:[102:19->102:21] Completable: Cpath Value[x].th [] -Complete tests/src/Jsx.res 106:28 +Complete src/Jsx.res 106:28 posCursor:[106:28] posNoWhite:[106:27] Found expr:[106:11->106:28] Pexp_ident DefineSomeFields.:[106:11->106:28] Completable: Cpath Value[DefineSomeFields, ""] @@ -321,7 +321,7 @@ Completable: Cpath Value[DefineSomeFields, ""] "documentation": null }] -Complete tests/src/Jsx.res 108:36 +Complete src/Jsx.res 108:36 posCursor:[108:36] posNoWhite:[108:35] Found expr:[108:11->108:36] Pexp_apply ...[108:13->108:14] (...[108:11->108:12], ...[108:15->108:36]) posCursor:[108:36] posNoWhite:[108:35] Found expr:[108:15->108:36] @@ -341,7 +341,7 @@ Completable: Cpath Module[DefineSomeFields].th "documentation": null }] -Complete tests/src/Jsx.res 122:20 +Complete src/Jsx.res 122:20 posCursor:[122:20] posNoWhite:[122:19] Found expr:[121:3->125:4] JSX 121:6] x[122:5->122:6]=...[122:7->122:20] name[124:4->124:8]=...[124:9->124:11]> _children:125:2 posCursor:[122:20] posNoWhite:[122:19] Found expr:[122:7->122:20] @@ -355,7 +355,7 @@ Completable: Cpath Value[Outer, Inner, h] "documentation": null }] -Complete tests/src/Jsx.res 129:19 +Complete src/Jsx.res 129:19 posCursor:[129:19] posNoWhite:[129:18] Found expr:[128:3->131:9] JSX 128:6] x[129:5->129:6]=...[129:7->131:8]> _children:None posCursor:[129:19] posNoWhite:[129:18] Found expr:[129:7->131:8] @@ -369,12 +369,12 @@ Completable: Cpath Value[Outer, Inner, ""] "documentation": null }] -Complete tests/src/Jsx.res 136:7 +Complete src/Jsx.res 136:7 posCursor:[136:7] posNoWhite:[136:6] Found expr:[135:3->138:9] JSX 135:6] x[136:5->136:6]=...[138:4->138:8]> _children:None [] -Complete tests/src/Jsx.res 150:21 +Complete src/Jsx.res 150:21 posCursor:[150:21] posNoWhite:[150:20] Found expr:[150:12->150:32] JSX 150:21] name[150:22->150:26]=...[150:27->150:29]> _children:150:30 Completable: Cpath Module[Nested, Co] @@ -386,7 +386,7 @@ Completable: Cpath Module[Nested, Co] "documentation": null }] -Complete tests/src/Jsx.res 153:19 +Complete src/Jsx.res 153:19 posCursor:[153:19] posNoWhite:[153:18] Found expr:[153:12->153:25] JSX 153:24] > _children:None Completable: Cpath Module[Nested, ""] diff --git a/analysis/tests/src/expected/Jsx.resi.txt b/analysis/tests/src/expected/Jsx.resi.txt index 0961f8835..b1a9a727d 100644 --- a/analysis/tests/src/expected/Jsx.resi.txt +++ b/analysis/tests/src/expected/Jsx.resi.txt @@ -1,10 +1,10 @@ -Hover tests/src/Jsx.resi 1:4 +Hover src/Jsx.resi 1:4 {"contents": "```rescript\n(~first: string, ~key: string=?, unit) => {\"first\": string}\n```"} -Hover tests/src/Jsx.resi 4:4 +Hover src/Jsx.resi 4:4 {"contents": "```rescript\nint\n```"} -Complete tests/src/Jsx.resi 7:19 +Complete src/Jsx.resi 7:19 posCursor:[7:19] posNoWhite:[7:18] Found type:[7:12->7:19] Ptyp_constr React.e:[7:12->7:19] Completable: Cpath Type[React, e] @@ -16,7 +16,7 @@ Completable: Cpath Type[React, e] "documentation": null }] -Complete tests/src/Jsx.resi 10:18 +Complete src/Jsx.resi 10:18 posCursor:[10:18] posNoWhite:[10:17] Found type:[10:11->10:18] Ptyp_constr React.e:[10:11->10:18] Completable: Cpath Type[React, e] diff --git a/analysis/tests/src/expected/LongIdentTest.res.txt b/analysis/tests/src/expected/LongIdentTest.res.txt index 2eea93e29..fd8238152 100644 --- a/analysis/tests/src/expected/LongIdentTest.res.txt +++ b/analysis/tests/src/expected/LongIdentTest.res.txt @@ -1,3 +1,3 @@ -Hover tests/src/LongIdentTest.res 2:13 +Hover src/LongIdentTest.res 2:13 {"contents": "```rescript\nint\n```"} diff --git a/analysis/tests/src/expected/Patterns.res.txt b/analysis/tests/src/expected/Patterns.res.txt index e0e13a62b..5c119ffb7 100644 --- a/analysis/tests/src/expected/Patterns.res.txt +++ b/analysis/tests/src/expected/Patterns.res.txt @@ -1,15 +1,15 @@ -Definition tests/src/Patterns.res 20:10 +Definition src/Patterns.res 20:10 {"uri": "Patterns.res", "range": {"start": {"line": 3, "character": 7}, "end": {"line": 3, "character": 10}}} -Definition tests/src/Patterns.res 25:11 +Definition src/Patterns.res 25:11 {"uri": "Patterns.res", "range": {"start": {"line": 9, "character": 7}, "end": {"line": 9, "character": 11}}} -Definition tests/src/Patterns.res 28:11 +Definition src/Patterns.res 28:11 {"uri": "Patterns.res", "range": {"start": {"line": 11, "character": 7}, "end": {"line": 11, "character": 8}}} -Definition tests/src/Patterns.res 31:11 +Definition src/Patterns.res 31:11 {"uri": "Patterns.res", "range": {"start": {"line": 15, "character": 9}, "end": {"line": 15, "character": 11}}} -Definition tests/src/Patterns.res 34:11 +Definition src/Patterns.res 34:11 {"uri": "Patterns.res", "range": {"start": {"line": 17, "character": 11}, "end": {"line": 17, "character": 16}}} diff --git a/analysis/tests/src/expected/RecModules.res.txt b/analysis/tests/src/expected/RecModules.res.txt index 80168487c..8fec94205 100644 --- a/analysis/tests/src/expected/RecModules.res.txt +++ b/analysis/tests/src/expected/RecModules.res.txt @@ -1,6 +1,6 @@ -Hover tests/src/RecModules.res 18:12 +Hover src/RecModules.res 18:12 {"contents": "```rescript\nmodule C = {\n type t\n let createA: t => A.t\n}\n```"} -Hover tests/src/RecModules.res 20:12 +Hover src/RecModules.res 20:12 {"contents": "```rescript\nmodule A = {\n type t\n let child: t => B.t\n}\n```"} diff --git a/analysis/tests/src/expected/RecordCompletion.res.txt b/analysis/tests/src/expected/RecordCompletion.res.txt index ea814ef52..2c88ceeba 100644 --- a/analysis/tests/src/expected/RecordCompletion.res.txt +++ b/analysis/tests/src/expected/RecordCompletion.res.txt @@ -1,4 +1,4 @@ -Complete tests/src/RecordCompletion.res 8:9 +Complete src/RecordCompletion.res 8:9 posCursor:[8:9] posNoWhite:[8:8] Found expr:[8:3->8:9] Completable: Cpath Value[t].n->m [{ @@ -15,7 +15,7 @@ Completable: Cpath Value[t].n->m "documentation": null }] -Complete tests/src/RecordCompletion.res 11:13 +Complete src/RecordCompletion.res 11:13 posCursor:[11:13] posNoWhite:[11:12] Found expr:[11:3->11:13] Completable: Cpath Value[t2].n2.n->m [{ @@ -32,7 +32,7 @@ Completable: Cpath Value[t2].n2.n->m "documentation": null }] -Complete tests/src/RecordCompletion.res 19:7 +Complete src/RecordCompletion.res 19:7 posCursor:[19:7] posNoWhite:[19:6] Found expr:[19:3->25:0] Pexp_field [19:3->19:4] R.:[19:5->25:0] Completable: Cpath Module[R]."" @@ -44,7 +44,7 @@ Completable: Cpath Module[R]."" "documentation": null }] -Complete tests/src/RecordCompletion.res 22:7 +Complete src/RecordCompletion.res 22:7 posCursor:[22:7] posNoWhite:[22:6] Found expr:[22:3->22:10] Pexp_field [22:3->22:4] R.xx:[22:5->22:10] Completable: Cpath Module[R]."" diff --git a/analysis/tests/src/expected/RecoveryOnProp.res.txt b/analysis/tests/src/expected/RecoveryOnProp.res.txt index f6ab89a31..fe509d768 100644 --- a/analysis/tests/src/expected/RecoveryOnProp.res.txt +++ b/analysis/tests/src/expected/RecoveryOnProp.res.txt @@ -1,4 +1,4 @@ -Complete tests/src/RecoveryOnProp.res 6:26 +Complete src/RecoveryOnProp.res 6:26 posCursor:[6:26] posNoWhite:[6:25] Found expr:[3:3->11:8] JSX 3:6] onClick[4:4->4:11]=...[4:13->0:-1]> _children:None posCursor:[6:26] posNoWhite:[6:25] Found expr:[4:13->8:6] diff --git a/analysis/tests/src/expected/References.res.txt b/analysis/tests/src/expected/References.res.txt index 54fac6e3f..64c02fb92 100644 --- a/analysis/tests/src/expected/References.res.txt +++ b/analysis/tests/src/expected/References.res.txt @@ -1,4 +1,4 @@ -References tests/src/References.res 0:4 +References src/References.res 0:4 [ {"uri": "Cross.res", "range": {"start": {"line": 0, "character": 26}, "end": {"line": 0, "character": 27}}}, {"uri": "Cross.res", "range": {"start": {"line": 3, "character": 27}, "end": {"line": 3, "character": 28}}}, @@ -8,7 +8,7 @@ References tests/src/References.res 0:4 {"uri": "References.res", "range": {"start": {"line": 7, "character": 8}, "end": {"line": 7, "character": 9}}} ] -References tests/src/References.res 9:19 +References src/References.res 9:19 [ {"uri": "References.res", "range": {"start": {"line": 9, "character": 11}, "end": {"line": 9, "character": 14}}}, {"uri": "References.res", "range": {"start": {"line": 9, "character": 19}, "end": {"line": 9, "character": 21}}} diff --git a/analysis/tests/src/expected/ReferencesWithInterface.res.txt b/analysis/tests/src/expected/ReferencesWithInterface.res.txt index 21a2cb634..33f2d105d 100644 --- a/analysis/tests/src/expected/ReferencesWithInterface.res.txt +++ b/analysis/tests/src/expected/ReferencesWithInterface.res.txt @@ -1,4 +1,4 @@ -References tests/src/ReferencesWithInterface.res 0:4 +References src/ReferencesWithInterface.res 0:4 [ {"uri": "Cross.res", "range": {"start": {"line": 9, "character": 52}, "end": {"line": 9, "character": 53}}}, {"uri": "Cross.res", "range": {"start": {"line": 12, "character": 53}, "end": {"line": 12, "character": 54}}}, diff --git a/analysis/tests/src/expected/ReferencesWithInterface.resi.txt b/analysis/tests/src/expected/ReferencesWithInterface.resi.txt index 4cb654a53..3e96fbc75 100644 --- a/analysis/tests/src/expected/ReferencesWithInterface.resi.txt +++ b/analysis/tests/src/expected/ReferencesWithInterface.resi.txt @@ -1,4 +1,4 @@ -References tests/src/ReferencesWithInterface.resi 0:4 +References src/ReferencesWithInterface.resi 0:4 [ {"uri": "Cross.res", "range": {"start": {"line": 9, "character": 52}, "end": {"line": 9, "character": 53}}}, {"uri": "Cross.res", "range": {"start": {"line": 12, "character": 53}, "end": {"line": 12, "character": 54}}}, diff --git a/analysis/tests/src/expected/Rename.res.txt b/analysis/tests/src/expected/Rename.res.txt index 5994f2992..5cd2adfee 100644 --- a/analysis/tests/src/expected/Rename.res.txt +++ b/analysis/tests/src/expected/Rename.res.txt @@ -1,4 +1,4 @@ -Rename tests/src/Rename.res 0:4 y +Rename src/Rename.res 0:4 y [ { "textDocument": { @@ -18,7 +18,7 @@ Rename tests/src/Rename.res 0:4 y } ] -Rename tests/src/Rename.res 9:19 yy +Rename src/Rename.res 9:19 yy [ { "textDocument": { diff --git a/analysis/tests/src/expected/RenameWithInterface.res.txt b/analysis/tests/src/expected/RenameWithInterface.res.txt index f241a3a41..a13988fa9 100644 --- a/analysis/tests/src/expected/RenameWithInterface.res.txt +++ b/analysis/tests/src/expected/RenameWithInterface.res.txt @@ -1,4 +1,4 @@ -Rename tests/src/RenameWithInterface.res 0:4 y +Rename src/RenameWithInterface.res 0:4 y [ { "textDocument": { diff --git a/analysis/tests/src/expected/RenameWithInterface.resi.txt b/analysis/tests/src/expected/RenameWithInterface.resi.txt index 2388633c0..2a1dabb44 100644 --- a/analysis/tests/src/expected/RenameWithInterface.resi.txt +++ b/analysis/tests/src/expected/RenameWithInterface.resi.txt @@ -1,4 +1,4 @@ -Rename tests/src/RenameWithInterface.resi 0:4 y +Rename src/RenameWithInterface.resi 0:4 y [ { "textDocument": { diff --git a/analysis/tests/src/expected/TypeDefinition.res.txt b/analysis/tests/src/expected/TypeDefinition.res.txt index 973cc6dd9..46a968e8f 100644 --- a/analysis/tests/src/expected/TypeDefinition.res.txt +++ b/analysis/tests/src/expected/TypeDefinition.res.txt @@ -1,18 +1,18 @@ -TypeDefinition tests/src/TypeDefinition.res 2:9 +TypeDefinition src/TypeDefinition.res 2:9 {"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 5}, "end": {"line": 2, "character": 11}}} -TypeDefinition tests/src/TypeDefinition.res 5:4 +TypeDefinition src/TypeDefinition.res 5:4 {"uri": "TypeDefinition.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 24}}} -TypeDefinition tests/src/TypeDefinition.res 8:4 +TypeDefinition src/TypeDefinition.res 8:4 {"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} -TypeDefinition tests/src/TypeDefinition.res 13:4 +TypeDefinition src/TypeDefinition.res 13:4 {"uri": "TypeDefinition.res", "range": {"start": {"line": 11, "character": 0}, "end": {"line": 11, "character": 26}}} -TypeDefinition tests/src/TypeDefinition.res 16:13 +TypeDefinition src/TypeDefinition.res 16:13 {"uri": "TypeDefinition.res", "range": {"start": {"line": 2, "character": 0}, "end": {"line": 2, "character": 28}}} -TypeDefinition tests/src/TypeDefinition.res 20:9 +TypeDefinition src/TypeDefinition.res 20:9 {"uri": "TypeDefinition.res", "range": {"start": {"line": 0, "character": 0}, "end": {"line": 0, "character": 24}}} diff --git a/analysis/tests/src/expected/Xform.res.txt b/analysis/tests/src/expected/Xform.res.txt index 4583cee1c..d298604ae 100644 --- a/analysis/tests/src/expected/Xform.res.txt +++ b/analysis/tests/src/expected/Xform.res.txt @@ -1,4 +1,4 @@ -Xform tests/src/Xform.res 6:5 +Xform src/Xform.res 6:5 Hit: Replace with switch {"start": {"line": 6, "character": 0}, "end": {"line": 11, "character": 1}} newText: @@ -10,7 +10,7 @@ switch kind { | _ => ret("Not First") } -Xform tests/src/Xform.res 13:15 +Xform src/Xform.res 13:15 Hit: Replace with switch {"start": {"line": 13, "character": 0}, "end": {"line": 13, "character": 79}} newText: @@ -20,23 +20,23 @@ switch kind { | _ => ret("Not First") } -Xform tests/src/Xform.res 16:5 +Xform src/Xform.res 16:5 Hit: Add type annotation {"start": {"line": 16, "character": 8}, "end": {"line": 16, "character": 8}} newText: <--here : string -Xform tests/src/Xform.res 19:5 +Xform src/Xform.res 19:5 -Xform tests/src/Xform.res 26:10 +Xform src/Xform.res 26:10 Hit: Add type annotation {"start": {"line": 26, "character": 10}, "end": {"line": 26, "character": 11}} newText: <--here (x: option) -Xform tests/src/Xform.res 30:9 +Xform src/Xform.res 30:9 Hit: Add braces to function {"start": {"line": 26, "character": 0}, "end": {"line": 32, "character": 3}} newText: @@ -50,23 +50,23 @@ let foo = x => { } } -Xform tests/src/Xform.res 34:21 +Xform src/Xform.res 34:21 Hit: Add type annotation {"start": {"line": 34, "character": 24}, "end": {"line": 34, "character": 24}} newText: <--here : int -Xform tests/src/Xform.res 38:5 +Xform src/Xform.res 38:5 -Xform tests/src/Xform.res 41:9 +Xform src/Xform.res 41:9 Hit: Add type annotation {"start": {"line": 41, "character": 11}, "end": {"line": 41, "character": 11}} newText: <--here : int -Xform tests/src/Xform.res 48:21 +Xform src/Xform.res 48:21 Hit: Add braces to function {"start": {"line": 48, "character": 0}, "end": {"line": 48, "character": 25}} newText: @@ -75,7 +75,7 @@ let noBraces = () => { name } -Xform tests/src/Xform.res 52:34 +Xform src/Xform.res 52:34 Hit: Add braces to function {"start": {"line": 51, "character": 0}, "end": {"line": 54, "character": 1}} newText: @@ -87,7 +87,7 @@ let nested = () => { // ^xfm } -Xform tests/src/Xform.res 62:6 +Xform src/Xform.res 62:6 Hit: Add braces to function {"start": {"line": 58, "character": 4}, "end": {"line": 62, "character": 7}} newText: diff --git a/analysis/test.sh b/analysis/tests/test.sh similarity index 73% rename from analysis/test.sh rename to analysis/tests/test.sh index 9585a319d..27a98ffb2 100755 --- a/analysis/test.sh +++ b/analysis/tests/test.sh @@ -1,6 +1,6 @@ -for file in tests/src/*.{res,resi}; do +for file in src/*.{res,resi}; do output="$(dirname $file)/expected/$(basename $file).txt" - ./rescript-editor-analysis.exe test $file &> $output + ../rescript-editor-analysis.exe test $file &> $output # CI. We use LF, and the CI OCaml fork prints CRLF. Convert. if [ "$RUNNER_OS" == "Windows" ]; then perl -pi -e 's/\r\n/\n/g' -- $output @@ -11,11 +11,11 @@ warningYellow='\033[0;33m' successGreen='\033[0;32m' reset='\033[0m' -diff=$(git ls-files --modified tests/src/expected) +diff=$(git ls-files --modified src/expected) if [[ $diff = "" ]]; then printf "${successGreen}✅ No unstaged tests difference.${reset}\n" else printf "${warningYellow}⚠️ There are unstaged differences in tests/! Did you break a test?\n${diff}\n${reset}" - git --no-pager diff tests/src/expected + git --no-pager diff src/expected exit 1 fi