Skip to content

Commit 915d15c

Browse files
committed
wip
# Conflicts: # yarn.lock # Conflicts: # tests/dependencies/rescript-react/package.json # yarn.lock
1 parent cba7ed7 commit 915d15c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+505
-4493
lines changed

analysis/examples/larger-project/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
},
1515
"dependencies": {
1616
"@glennsl/bs-json": "^5.0.4",
17-
"@rescript/react": "^0.10.3"
17+
"@rescript/react": "workspace:^"
1818
}
1919
}

biome.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"files": {
5656
"ignore": [
5757
".yarn/**",
58+
"tests/dependencies/**/src/**",
5859
"tests/analysis_tests/**/src/**",
5960
"tests/build_tests/**/src/**",
6061
"tests/docstring_tests/**",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"tests/analysis_tests/**",
102102
"tests/docstring_tests",
103103
"tests/gentype_tests/**",
104+
"tests/tests",
104105
"tests/tools_tests",
105106
"scripts/res"
106107
],

packages/playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"serve-bundle": "node serve-bundle.mjs"
1111
},
1212
"dependencies": {
13-
"@rescript/react": "^0.13.1",
13+
"@rescript/react": "workspace:^",
1414
"rescript": "workspace:^"
1515
},
1616
"devDependencies": {

tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@
359359
addValueDeclaration +make Hooks.res:63:6 path:+Hooks.RenderPropRequiresConversion
360360
addRecordLabelDeclaration name Hooks.res:1:16 path:+Hooks.vehicle
361361
addRecordLabelDeclaration vehicle Hooks.res:4:12 path:+Hooks.props
362-
addValueReference Hooks.res:5:26 --> React.res:134:0
362+
addValueReference Hooks.res:5:26 --> React.res:135:0
363363
addTypeReference Hooks.res:10:29 --> Hooks.res:1:16
364364
addValueReference Hooks.res:10:29 --> Hooks.res:4:12
365365
addValueReference Hooks.res:10:75 --> Hooks.res:5:7

tests/analysis_tests/tests-reanalyze/deadcode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"clean": "rescript clean"
77
},
88
"dependencies": {
9-
"@rescript/react": "link:../../../dependencies/rescript-react",
9+
"@rescript/react": "workspace:^",
1010
"rescript": "workspace:^"
1111
}
1212
}

tests/analysis_tests/tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"clean": "rescript clean"
77
},
88
"dependencies": {
9-
"@rescript/react": "link:../../dependencies/rescript-react",
9+
"@rescript/react": "workspace:^",
1010
"rescript": "workspace:^"
1111
}
1212
}

tests/analysis_tests/tests/src/expected/CompletionExpressions.res.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,13 +865,13 @@ ContextPath CArgument Value[fnTakingCallback]($2)
865865
ContextPath Value[fnTakingCallback]
866866
Path fnTakingCallback
867867
[{
868-
"label": "event => event",
868+
"label": "mouse => mouse",
869869
"kind": 12,
870870
"tags": [],
871871
"detail": "ReactEvent.Mouse.t => unit",
872872
"documentation": null,
873873
"sortText": "A",
874-
"insertText": "${1:event} => ${0:event}",
874+
"insertText": "${1:mouse} => ${0:mouse}",
875875
"insertTextFormat": 2
876876
}]
877877

tests/analysis_tests/tests/src/expected/CompletionInferValues.res.txt

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,7 @@ ContextPath CArgument CArgument Value[reactEventFn]($0)($0)
250250
ContextPath CArgument Value[reactEventFn]($0)
251251
ContextPath Value[reactEventFn]
252252
Path reactEventFn
253-
CPPipe pathFromEnv:ReactEvent.Mouse found:false
254-
Path ReactEvent.Mouse.pr
255-
Path pr
256-
[{
257-
"label": "ReactEvent.Mouse.preventDefault",
258-
"kind": 12,
259-
"tags": [],
260-
"detail": "t => unit",
261-
"documentation": null
262-
}]
253+
[]
263254

264255
Complete src/CompletionInferValues.res 41:50
265256
posCursor:[41:50] posNoWhite:[41:49] Found expr:[41:11->41:56]
@@ -275,17 +266,7 @@ Path event
275266
ContextPath CArgument CJsxPropValue [div] onMouseEnter($0)
276267
ContextPath CJsxPropValue [div] onMouseEnter
277268
Path ReactDOM.domProps
278-
Path JsxDOM.domProps
279-
CPPipe pathFromEnv:JsxEvent.Mouse found:false
280-
Path JsxEvent.Mouse.pr
281-
Path pr
282-
[{
283-
"label": "JsxEvent.Mouse.preventDefault",
284-
"kind": 12,
285-
"tags": [],
286-
"detail": "t => unit",
287-
"documentation": null
288-
}]
269+
[]
289270

290271
Complete src/CompletionInferValues.res 44:50
291272
posCursor:[44:50] posNoWhite:[44:49] Found expr:[44:11->44:56]
@@ -832,22 +813,7 @@ ContextPath CArgument CArgument Value[fn2](~cb)($0)
832813
ContextPath CArgument Value[fn2](~cb)
833814
ContextPath Value[fn2]
834815
Path fn2
835-
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
836-
Path ReactDOM.Client.Root.
837-
Path
838-
[{
839-
"label": "ReactDOM.Client.Root.unmount",
840-
"kind": 12,
841-
"tags": [],
842-
"detail": "(t, unit) => unit",
843-
"documentation": null
844-
}, {
845-
"label": "ReactDOM.Client.Root.render",
846-
"kind": 12,
847-
"tags": [],
848-
"detail": "(t, React.element) => unit",
849-
"documentation": null
850-
}]
816+
[]
851817

852818
Complete src/CompletionInferValues.res 139:30
853819
posCursor:[139:30] posNoWhite:[139:29] Found expr:[139:3->139:33]
@@ -974,22 +940,7 @@ ContextPath CArgument CArgument Value[CompletionSupport2, makeRenderer](~render)
974940
ContextPath CArgument Value[CompletionSupport2, makeRenderer](~render)
975941
ContextPath Value[CompletionSupport2, makeRenderer]
976942
Path CompletionSupport2.makeRenderer
977-
CPPipe pathFromEnv:ReactDOM.Client.Root found:false
978-
Path ReactDOM.Client.Root.
979-
Path
980-
[{
981-
"label": "ReactDOM.Client.Root.unmount",
982-
"kind": 12,
983-
"tags": [],
984-
"detail": "(t, unit) => unit",
985-
"documentation": null
986-
}, {
987-
"label": "ReactDOM.Client.Root.render",
988-
"kind": 12,
989-
"tags": [],
990-
"detail": "(t, React.element) => unit",
991-
"documentation": null
992-
}]
943+
[]
993944

994945
Hover src/CompletionInferValues.res 160:27
995946
Nothing at that position. Now trying to use completion.

tests/analysis_tests/tests/src/expected/CompletionJsx.res.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,8 @@ Completable: Cjsx([h1], hidd, [hidd])
629629
Package opens Stdlib.place holder Pervasives.JsxModules.place holder
630630
Resolved opens 1 Stdlib
631631
Path ReactDOM.domProps
632-
Path JsxDOM.domProps
633-
[{
634-
"label": "hidden",
635-
"kind": 4,
636-
"tags": [],
637-
"detail": "bool",
638-
"documentation": null
639-
}]
632+
[completing-lowercase-jsx] could not find element props to complete from.
633+
[]
640634

641635
Complete src/CompletionJsx.res 61:30
642636
posCursor:[61:30] posNoWhite:[61:28] Found expr:[61:3->61:29]

0 commit comments

Comments
 (0)