From 215737f25dbe0c624f8010e80628098eb67d740f Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 2 Dec 2024 15:27:35 +0100 Subject: [PATCH 1/4] Use current compiler for tests. --- .../package-lock.json | 35 +++++++++----- .../tests-generic-jsx-transform/package.json | 2 +- .../package-lock.json | 35 +++++++++----- .../package.json | 2 +- .../deadcode/package-lock.json | 46 ++++++++++++------- .../tests-reanalyze/deadcode/package.json | 2 +- .../termination/package-lock.json | 38 ++++++++++----- .../tests-reanalyze/termination/package.json | 2 +- .../package-lock.json | 3 +- 9 files changed, 110 insertions(+), 55 deletions(-) diff --git a/tests/analysis_tests/tests-generic-jsx-transform/package-lock.json b/tests/analysis_tests/tests-generic-jsx-transform/package-lock.json index 8966274c5d..9d41adabff 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/package-lock.json +++ b/tests/analysis_tests/tests-generic-jsx-transform/package-lock.json @@ -5,29 +5,42 @@ "packages": { "": { "dependencies": { - "rescript": "11.1.0-rc.2" + "rescript": "file:../../.." } }, - "node_modules/rescript": { - "version": "11.1.0-rc.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.0-rc.2.tgz", - "integrity": "sha512-kCUtmsODEUF1Eth5ppc+yIK79HLI7CwRs1R4iopDek4FC58IqHSLT3K1XHGB39YCWuOuV9WMly+wksHRJcSLcw==", + "../../..": { + "version": "12.0.0-alpha.6", "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", "bin": { - "bsc": "bsc", + "bsc": "cli/bsc", "bstracing": "lib/bstracing", - "rescript": "rescript" + "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", + "rewatch": "cli/rewatch" + }, + "devDependencies": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" }, "engines": { - "node": ">=10" + "node": ">=18" } + }, + "node_modules/rescript": { + "resolved": "../../..", + "link": true } }, "dependencies": { "rescript": { - "version": "11.1.0-rc.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.0-rc.2.tgz", - "integrity": "sha512-kCUtmsODEUF1Eth5ppc+yIK79HLI7CwRs1R4iopDek4FC58IqHSLT3K1XHGB39YCWuOuV9WMly+wksHRJcSLcw==" + "version": "file:../../..", + "requires": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + } } } } diff --git a/tests/analysis_tests/tests-generic-jsx-transform/package.json b/tests/analysis_tests/tests-generic-jsx-transform/package.json index 000126246c..517996fa74 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/package.json +++ b/tests/analysis_tests/tests-generic-jsx-transform/package.json @@ -5,6 +5,6 @@ }, "private": true, "dependencies": { - "rescript": "11.1.0-rc.2" + "rescript": "file:../../.." } } diff --git a/tests/analysis_tests/tests-incremental-typechecking/package-lock.json b/tests/analysis_tests/tests-incremental-typechecking/package-lock.json index b3161b7993..7ac4926c77 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/package-lock.json +++ b/tests/analysis_tests/tests-incremental-typechecking/package-lock.json @@ -5,29 +5,42 @@ "packages": { "": { "dependencies": { - "rescript": "11.1.0-rc.2" + "rescript": "file:../../.." } }, - "node_modules/rescript": { - "version": "11.1.0-rc.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.0-rc.2.tgz", - "integrity": "sha512-kCUtmsODEUF1Eth5ppc+yIK79HLI7CwRs1R4iopDek4FC58IqHSLT3K1XHGB39YCWuOuV9WMly+wksHRJcSLcw==", + "../../..": { + "version": "12.0.0-alpha.6", "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", "bin": { - "bsc": "bsc", + "bsc": "cli/bsc", "bstracing": "lib/bstracing", - "rescript": "rescript" + "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", + "rewatch": "cli/rewatch" + }, + "devDependencies": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" }, "engines": { - "node": ">=10" + "node": ">=18" } + }, + "node_modules/rescript": { + "resolved": "../../..", + "link": true } }, "dependencies": { "rescript": { - "version": "11.1.0-rc.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.0-rc.2.tgz", - "integrity": "sha512-kCUtmsODEUF1Eth5ppc+yIK79HLI7CwRs1R4iopDek4FC58IqHSLT3K1XHGB39YCWuOuV9WMly+wksHRJcSLcw==" + "version": "file:../../..", + "requires": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + } } } } diff --git a/tests/analysis_tests/tests-incremental-typechecking/package.json b/tests/analysis_tests/tests-incremental-typechecking/package.json index 000126246c..517996fa74 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/package.json +++ b/tests/analysis_tests/tests-incremental-typechecking/package.json @@ -5,6 +5,6 @@ }, "private": true, "dependencies": { - "rescript": "11.1.0-rc.2" + "rescript": "file:../../.." } } diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json b/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json index 1ca4ed0ba0..35f6c29214 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json @@ -14,7 +14,28 @@ "devDependencies": { "react": "^16.13.1", "react-dom": "^16.8.6", - "rescript": "^10.1.2" + "rescript": "file:../../../.." + } + }, + "../../../..": { + "version": "12.0.0-alpha.6", + "dev": true, + "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", + "bin": { + "bsc": "cli/bsc", + "bstracing": "lib/bstracing", + "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", + "rewatch": "cli/rewatch" + }, + "devDependencies": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + }, + "engines": { + "node": ">=18" } }, "node_modules/@glennsl/bs-json": { @@ -98,17 +119,8 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/rescript": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-10.1.2.tgz", - "integrity": "sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA==", - "dev": true, - "hasInstallScript": true, - "bin": { - "bsc": "bsc", - "bsrefmt": "bsrefmt", - "bstracing": "lib/bstracing", - "rescript": "rescript" - } + "resolved": "../../../..", + "link": true }, "node_modules/scheduler": { "version": "0.19.1", @@ -187,10 +199,12 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "rescript": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-10.1.2.tgz", - "integrity": "sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA==", - "dev": true + "version": "file:../../../..", + "requires": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + } }, "scheduler": { "version": "0.19.1", diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/package.json b/tests/analysis_tests/tests-reanalyze/deadcode/package.json index 651648f5a2..dff7874dfd 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/package.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/package.json @@ -5,7 +5,7 @@ "devDependencies": { "react": "^16.13.1", "react-dom": "^16.8.6", - "rescript": "^10.1.2" + "rescript": "file:../../../.." }, "dependencies": { "@glennsl/bs-json": "^5.0.4", diff --git a/tests/analysis_tests/tests-reanalyze/termination/package-lock.json b/tests/analysis_tests/tests-reanalyze/termination/package-lock.json index ec4b873ca7..99d878c69c 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/package-lock.json +++ b/tests/analysis_tests/tests-reanalyze/termination/package-lock.json @@ -8,29 +8,43 @@ "name": "termination", "version": "0.1.0", "devDependencies": { - "rescript": "^10.1.2" + "rescript": "file:../../../.." } }, - "node_modules/rescript": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-10.1.2.tgz", - "integrity": "sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA==", + "../../../..": { + "version": "12.0.0-alpha.6", "dev": true, "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", "bin": { - "bsc": "bsc", - "bsrefmt": "bsrefmt", + "bsc": "cli/bsc", "bstracing": "lib/bstracing", - "rescript": "rescript" + "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", + "rewatch": "cli/rewatch" + }, + "devDependencies": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + }, + "engines": { + "node": ">=18" } + }, + "node_modules/rescript": { + "resolved": "../../../..", + "link": true } }, "dependencies": { "rescript": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-10.1.2.tgz", - "integrity": "sha512-PPdhOiN+lwqxQ0qvzHc1KW0TL12LDy2X+qo/JIMIP3bMfiH0vxQH2e/lXuoutWWm04fGQGTv3hWH+gKW3/UyfA==", - "dev": true + "version": "file:../../../..", + "requires": { + "@biomejs/biome": "1.8.3", + "mocha": "10.1.0", + "nyc": "15.0.0" + } } } } diff --git a/tests/analysis_tests/tests-reanalyze/termination/package.json b/tests/analysis_tests/tests-reanalyze/termination/package.json index 6ed0f459a5..e9587e7f63 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/package.json +++ b/tests/analysis_tests/tests-reanalyze/termination/package.json @@ -3,6 +3,6 @@ "version": "0.1.0", "private": true, "devDependencies": { - "rescript": "^10.1.2" + "rescript": "file:../../../.." } } diff --git a/tests/gentype_tests/typescript-react-example/package-lock.json b/tests/gentype_tests/typescript-react-example/package-lock.json index 090c2be357..5daa3f9e83 100644 --- a/tests/gentype_tests/typescript-react-example/package-lock.json +++ b/tests/gentype_tests/typescript-react-example/package-lock.json @@ -22,7 +22,7 @@ }, "../../..": { "name": "rescript", - "version": "12.0.0-alpha.5", + "version": "12.0.0-alpha.6", "dev": true, "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", @@ -30,6 +30,7 @@ "bsc": "cli/bsc", "bstracing": "lib/bstracing", "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", "rewatch": "cli/rewatch" }, "devDependencies": { From 834695d3c98b35fb07f99460c9fe2f9ab3113fcf Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 2 Dec 2024 16:06:37 +0100 Subject: [PATCH 2/4] Adapt analysis tests. --- .../src/expected/GenericJsxCompletion.res.txt | 5 +- .../ConstructorCompletion__Json.res.txt | 3 +- .../ConstructorCompletion__Own.res.txt | 1 - .../deadcode/expected/deadcode.txt | 645 +++++++----------- .../deadcode/expected/exception.txt | 102 +-- .../deadcode/package-lock.json | 168 +---- .../tests-reanalyze/deadcode/package.json | 5 +- .../deadcode/{bsconfig.json => rescript.json} | 7 +- .../deadcode/src/CreateErrorHandler1.res | 2 +- .../tests-reanalyze/deadcode/src/DeadTest.res | 26 +- .../tests-reanalyze/deadcode/src/FC.res | 12 - .../tests-reanalyze/deadcode/src/Hooks.res | 50 +- .../deadcode/src/ImportHookDefault.res | 8 - .../deadcode/src/ImportIndex.res | 2 +- .../deadcode/src/TestPromise.res | 2 +- .../tests-reanalyze/deadcode/src/Types.res | 9 +- .../tests-reanalyze/deadcode/src/Unison.res | 6 +- .../deadcode/src/exception/BsJson.res | 5 - .../deadcode/src/exception/Exn.res | 42 -- .../deadcode/src/exception/InnerModules.res | 27 - .../src/exception/TestInnerModules.res | 8 - .../tests-reanalyze/termination/bsconfig.json | 4 +- .../termination/expected/termination.txt | 63 +- .../termination/src/TestCyberTruck.res | 14 +- tests/analysis_tests/tests/package-lock.json | 3 +- 25 files changed, 389 insertions(+), 830 deletions(-) rename tests/analysis_tests/tests-reanalyze/deadcode/{bsconfig.json => rescript.json} (65%) delete mode 100644 tests/analysis_tests/tests-reanalyze/deadcode/src/FC.res diff --git a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt index 675fbdde43..f2cbf254f5 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt +++ b/tests/analysis_tests/tests-generic-jsx-transform/src/expected/GenericJsxCompletion.res.txt @@ -3,7 +3,6 @@ posCursor:[0:8] posNoWhite:[0:6] Found expr:[0:4->0:7] JSX 0:7] > _children:None Completable: Cjsx([div], "", []) Package opens Pervasives.JsxModules.place holder -Resolved opens 1 Pervasives Path GenericJsx.Elements.props [{ "label": "testing", @@ -30,7 +29,6 @@ posCursor:[3:17] posNoWhite:[3:16] Found expr:[3:4->3:18] JSX 3:7] testing[3:8->3:15]=...[3:16->3:18]> _children:None Completable: Cexpression CJsxPropValue [div] testing->recordBody Package opens Pervasives.JsxModules.place holder -Resolved opens 1 Pervasives ContextPath CJsxPropValue [div] testing Path GenericJsx.Elements.props [{ @@ -59,7 +57,6 @@ posCursor:[14:21] posNoWhite:[14:20] Found expr:[14:7->22:10] posCursor:[14:21] posNoWhite:[14:20] Found expr:[14:7->14:21] Completable: Cpath Value[someString]->st <> Package opens Pervasives.JsxModules.place holder -Resolved opens 1 Pervasives ContextPath Value[someString]->st <> ContextPath Value[someString] Path someString @@ -108,7 +105,7 @@ posCursor:[20:24] posNoWhite:[20:23] Found expr:[20:10->20:24] Completable: Cpath Value[someString]->st <> Raw opens: 1 GenericJsx.place holder Package opens Pervasives.JsxModules.place holder -Resolved opens 2 Pervasives GenericJsx +Resolved opens 1 GenericJsx ContextPath Value[someString]->st <> ContextPath Value[someString] Path someString diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt index 6aeda7c87b..f8ec1d135a 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Json.res.txt @@ -5,14 +5,13 @@ Json Array:[0:8->0:21] [0:21->0:23] Completable: Cexpression CTypeAtPos()->variantPayload::Array($0) Package opens Pervasives.JsxModules.place holder -Resolved opens 1 Pervasives ContextPath CTypeAtPos() [{ "label": "[]", "kind": 12, "tags": [], "detail": "t", - "documentation": {"kind": "markdown", "value": " The JSON data structure \n\n```rescript\n@unboxed\ntype t =\n | Boolean(bool)\n | @as(null) Null\n | String(string)\n | Number(float)\n | Object(Js.Dict.t)\n | Array(array)\n```"}, + "documentation": {"kind": "markdown", "value": " The JSON data structure \n\n```rescript\n@unboxed\ntype t =\n | Boolean(bool)\n | @as(null) Null\n | String(string)\n | Number(float)\n | Object(dict)\n | Array(array)\n```"}, "sortText": "A", "insertText": "[$0]", "insertTextFormat": 2 diff --git a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt index 0199e72d8e..670bfc7bc2 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt +++ b/tests/analysis_tests/tests-incremental-typechecking/src/expected/ConstructorCompletion__Own.res.txt @@ -4,7 +4,6 @@ Pexp_construct WithVariant One:[4:8->4:23] [4:23->4:25] Completable: Cexpression CTypeAtPos()->variantPayload::One($0) Package opens Pervasives.JsxModules.place holder -Resolved opens 1 Pervasives ContextPath CTypeAtPos() [{ "label": "{}", diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt index eb561f9f66..860577fc40 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt +++ b/tests/analysis_tests/tests-reanalyze/deadcode/expected/deadcode.txt @@ -15,15 +15,32 @@ addValueReference BucklescriptAnnotations.res:25:4 --> BucklescriptAnnotations.res:26:6 Scanning ComponentAsProp.cmt Source:ComponentAsProp.res addValueDeclaration +make ComponentAsProp.res:6:4 path:+ComponentAsProp - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: ComponentAsProp.res:7:3 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: ComponentAsProp.res:8:5 + addRecordLabelDeclaration title ComponentAsProp.res:6:12 path:+ComponentAsProp.props + addRecordLabelDeclaration description ComponentAsProp.res:6:20 path:+ComponentAsProp.props + addRecordLabelDeclaration button ComponentAsProp.res:6:34 path:+ComponentAsProp.props addValueReference ComponentAsProp.res:9:6 --> ComponentAsProp.res:6:12 addValueReference ComponentAsProp.res:10:6 --> ComponentAsProp.res:6:20 addValueReference ComponentAsProp.res:12:24 --> ComponentAsProp.res:12:13 addValueReference ComponentAsProp.res:13:16 --> React.res:3:0 addValueReference ComponentAsProp.res:11:14 --> ComponentAsProp.res:6:34 - addValueReference ComponentAsProp.res:8:5 --> ReactDOMRe.res:8:0 - addValueReference ComponentAsProp.res:7:3 --> ReactDOMRe.res:8:0 + addValueReference ComponentAsProp.res:9:6 --> ComponentAsProp.res:6:12 + addValueReference ComponentAsProp.res:10:6 --> ComponentAsProp.res:6:20 + addValueReference ComponentAsProp.res:12:24 --> ComponentAsProp.res:12:13 + addValueReference ComponentAsProp.res:13:16 --> React.res:3:0 + addValueReference ComponentAsProp.res:11:14 --> ComponentAsProp.res:6:34 + addValueReference ComponentAsProp.res:9:6 --> ComponentAsProp.res:6:12 + addValueReference ComponentAsProp.res:10:6 --> ComponentAsProp.res:6:20 + addValueReference ComponentAsProp.res:12:24 --> ComponentAsProp.res:12:13 + addValueReference ComponentAsProp.res:13:16 --> React.res:3:0 + addValueReference ComponentAsProp.res:11:14 --> ComponentAsProp.res:6:34 + addValueReference ComponentAsProp.res:9:6 --> ComponentAsProp.res:6:12 + addValueReference ComponentAsProp.res:10:6 --> ComponentAsProp.res:6:20 + addValueReference ComponentAsProp.res:12:24 --> ComponentAsProp.res:12:13 + addValueReference ComponentAsProp.res:13:16 --> React.res:3:0 + addValueReference ComponentAsProp.res:11:14 --> ComponentAsProp.res:6:34 + addTypeReference _none_:1:-1 --> ComponentAsProp.res:6:12 + addTypeReference _none_:1:-1 --> ComponentAsProp.res:6:20 + addTypeReference _none_:1:-1 --> ComponentAsProp.res:6:34 Scanning CreateErrorHandler1.cmt Source:CreateErrorHandler1.res addValueDeclaration +notification CreateErrorHandler1.res:3:6 path:+CreateErrorHandler1.Error1 addValueReference CreateErrorHandler1.res:3:6 --> CreateErrorHandler1.res:3:21 @@ -89,22 +106,18 @@ addValueDeclaration +foo DeadTest.res:90:8 path:+DeadTest addValueDeclaration +bar DeadTest.res:94:4 path:+DeadTest addValueDeclaration +withDefaultValue DeadTest.res:96:4 path:+DeadTest - addValueDeclaration +reasonResource DeadTest.res:111:6 path:+DeadTest.LazyDynamicallyLoadedComponent2 - addValueDeclaration +makeProps DeadTest.res:114:6 path:+DeadTest.LazyDynamicallyLoadedComponent2 - addValueDeclaration +make DeadTest.res:115:6 path:+DeadTest.LazyDynamicallyLoadedComponent2 - addValueDeclaration +zzz DeadTest.res:127:4 path:+DeadTest - addValueDeclaration +second DeadTest.res:135:4 path:+DeadTest - addValueDeclaration +minute DeadTest.res:136:4 path:+DeadTest - addValueDeclaration +deadRef DeadTest.res:138:4 path:+DeadTest - addValueDeclaration +make DeadTest.res:141:4 path:+DeadTest - addValueDeclaration +theSideEffectIsLogging DeadTest.res:145:4 path:+DeadTest - addValueDeclaration +stringLengthNoSideEffects DeadTest.res:147:4 path:+DeadTest - addValueDeclaration +globallyLive1 DeadTest.res:152:6 path:+DeadTest.GloobLive - addValueDeclaration +globallyLive2 DeadTest.res:153:6 path:+DeadTest.GloobLive - addValueDeclaration +globallyLive3 DeadTest.res:154:6 path:+DeadTest.GloobLive - addValueDeclaration +funWithInnerVars DeadTest.res:169:4 path:+DeadTest - addValueDeclaration +deadIncorrect DeadTest.res:178:4 path:+DeadTest - addValueDeclaration +ira DeadTest.res:184:4 path:+DeadTest + addValueDeclaration +zzz DeadTest.res:104:4 path:+DeadTest + addValueDeclaration +second DeadTest.res:112:4 path:+DeadTest + addValueDeclaration +deadRef DeadTest.res:114:4 path:+DeadTest + addValueDeclaration +make DeadTest.res:117:4 path:+DeadTest + addValueDeclaration +theSideEffectIsLogging DeadTest.res:121:4 path:+DeadTest + addValueDeclaration +stringLengthNoSideEffects DeadTest.res:123:4 path:+DeadTest + addValueDeclaration +globallyLive1 DeadTest.res:128:6 path:+DeadTest.GloobLive + addValueDeclaration +globallyLive2 DeadTest.res:129:6 path:+DeadTest.GloobLive + addValueDeclaration +globallyLive3 DeadTest.res:130:6 path:+DeadTest.GloobLive + addValueDeclaration +funWithInnerVars DeadTest.res:145:4 path:+DeadTest + addValueDeclaration +deadIncorrect DeadTest.res:154:4 path:+DeadTest + addValueDeclaration +ira DeadTest.res:160:4 path:+DeadTest addValueReference DeadTest.res:1:15 --> ImmutableArray.resi:9:0 addValueReference DeadTest.res:8:7 --> DeadTest.res:7:4 addValueReference DeadTest.res:11:7 --> DeadTest.res:10:4 @@ -153,62 +166,55 @@ addValueReference DeadTest.res:96:4 --> DeadTest.res:96:42 addValueReference DeadTest.res:96:4 --> DeadTest.res:96:24 addValueReference DeadTest.res:96:4 --> DeadTest.res:96:45 - addTypeReference DeadTest.res:106:16 --> DeadRT.resi:2:2 - addValueReference DeadTest.res:111:6 --> JSResource.res:3:0 - addValueReference DeadTest.res:115:6 --> DynamicallyLoadedComponent.res:2:4 - addValueReference DeadTest.res:115:6 --> DeadTest.res:111:6 - addValueReference DeadTest.res:115:6 --> BootloaderResource.res:3:0 - addValueReference DeadTest.res:115:6 --> DeadTest.res:115:13 - addValueReference DeadTest.res:115:6 --> React.res:18:0 - addValueDeclaration +a1 DeadTest.res:128:6 path:+DeadTest - addValueDeclaration +a2 DeadTest.res:129:6 path:+DeadTest - addValueDeclaration +a3 DeadTest.res:130:6 path:+DeadTest - addValueReference DeadTest.res:133:17 --> DynamicallyLoadedComponent.res:2:4 - addValueReference DeadTest.res:133:17 --> React.res:18:0 - addValueReference DeadTest.res:136:4 --> DeadTest.res:135:4 - addValueReference DeadTest.res:141:32 --> DeadTest.res:141:12 - addValueReference DeadTest.res:141:19 --> React.res:7:0 - addValueReference DeadTest.res:143:16 --> DeadTest.res:141:4 - addVariantCaseDeclaration A DeadTest.res:158:11 path:+DeadTest.WithInclude.t - addVariantCaseDeclaration A DeadTest.res:161:13 path:+DeadTest.WithInclude.T.t - addVariantCaseDeclaration A DeadTest.res:161:13 path:+DeadTest.WithInclude.t - extendTypeDependencies DeadTest.res:161:13 --> DeadTest.res:158:11 - extendTypeDependencies DeadTest.res:158:11 --> DeadTest.res:161:13 - addTypeReference DeadTest.res:166:7 --> DeadTest.res:158:11 - addValueDeclaration +x DeadTest.res:170:6 path:+DeadTest - addValueDeclaration +y DeadTest.res:171:6 path:+DeadTest - addValueReference DeadTest.res:169:4 --> DeadTest.res:170:6 - addValueReference DeadTest.res:169:4 --> DeadTest.res:171:6 - addRecordLabelDeclaration a DeadTest.res:175:11 path:+DeadTest.rc - addValueDeclaration +_ DeadTest.res:180:0 path:+DeadTest - addValueReference DeadTest.res:180:8 --> DeadTest.res:178:4 - addRecordLabelDeclaration IR.a DeadTest.res:182:24 path:+DeadTest.inlineRecord - addRecordLabelDeclaration IR.b DeadTest.res:182:32 path:+DeadTest.inlineRecord - addRecordLabelDeclaration IR.c DeadTest.res:182:40 path:+DeadTest.inlineRecord - addRecordLabelDeclaration IR.d DeadTest.res:182:51 path:+DeadTest.inlineRecord - addRecordLabelDeclaration IR.e DeadTest.res:182:65 path:+DeadTest.inlineRecord - addVariantCaseDeclaration IR DeadTest.res:182:20 path:+DeadTest.inlineRecord - addValueDeclaration +_ DeadTest.res:185:0 path:+DeadTest - addTypeReference DeadTest.res:187:20 --> DeadTest.res:182:20 - addValueReference DeadTest.res:187:27 --> DeadTest.res:184:4 - addTypeReference DeadTest.res:187:35 --> DeadTest.res:182:32 - addValueReference DeadTest.res:187:35 --> DeadTest.res:187:7 - addValueReference DeadTest.res:187:40 --> DeadTest.res:187:8 - addTypeReference DeadTest.res:187:7 --> DeadTest.res:182:40 - addValueReference DeadTest.res:186:9 --> DeadTest.res:185:8 - addRecordLabelDeclaration IR2.a DeadTest.res:191:26 path:+DeadTest.inlineRecord2 - addRecordLabelDeclaration IR2.b DeadTest.res:191:34 path:+DeadTest.inlineRecord2 - addVariantCaseDeclaration IR2 DeadTest.res:191:21 path:+DeadTest.inlineRecord2 - addRecordLabelDeclaration IR3.a DeadTest.res:193:34 path:+DeadTest.inlineRecord3 - addRecordLabelDeclaration IR3.b DeadTest.res:193:42 path:+DeadTest.inlineRecord3 - addVariantCaseDeclaration IR3 DeadTest.res:193:21 path:+DeadTest.inlineRecord3 + addTypeReference DeadTest.res:98:16 --> DeadRT.resi:2:2 + addValueDeclaration +a1 DeadTest.res:105:6 path:+DeadTest + addValueDeclaration +a2 DeadTest.res:106:6 path:+DeadTest + addValueDeclaration +a3 DeadTest.res:107:6 path:+DeadTest + addValueReference DeadTest.res:110:17 --> DynamicallyLoadedComponent.res:2:4 + addRecordLabelDeclaration s DeadTest.res:117:12 path:+DeadTest.props + addValueReference DeadTest.res:117:32 --> DeadTest.res:117:12 + addValueReference DeadTest.res:117:19 --> React.res:7:0 + addTypeReference _none_:1:-1 --> DeadTest.res:117:12 + addValueReference DeadTest.res:119:16 --> DeadTest.res:117:4 + addVariantCaseDeclaration A DeadTest.res:134:11 path:+DeadTest.WithInclude.t + addVariantCaseDeclaration A DeadTest.res:137:13 path:+DeadTest.WithInclude.T.t + addVariantCaseDeclaration A DeadTest.res:137:13 path:+DeadTest.WithInclude.t + extendTypeDependencies DeadTest.res:137:13 --> DeadTest.res:134:11 + extendTypeDependencies DeadTest.res:134:11 --> DeadTest.res:137:13 + addTypeReference DeadTest.res:142:7 --> DeadTest.res:134:11 + addValueDeclaration +x DeadTest.res:146:6 path:+DeadTest + addValueDeclaration +y DeadTest.res:147:6 path:+DeadTest + addValueReference DeadTest.res:145:4 --> DeadTest.res:146:6 + addValueReference DeadTest.res:145:4 --> DeadTest.res:147:6 + addRecordLabelDeclaration a DeadTest.res:151:11 path:+DeadTest.rc + addValueDeclaration +_ DeadTest.res:156:0 path:+DeadTest + addValueReference DeadTest.res:156:8 --> DeadTest.res:154:4 + addRecordLabelDeclaration IR.a DeadTest.res:158:24 path:+DeadTest.inlineRecord + addRecordLabelDeclaration IR.b DeadTest.res:158:32 path:+DeadTest.inlineRecord + addRecordLabelDeclaration IR.c DeadTest.res:158:40 path:+DeadTest.inlineRecord + addRecordLabelDeclaration IR.d DeadTest.res:158:51 path:+DeadTest.inlineRecord + addRecordLabelDeclaration IR.e DeadTest.res:158:65 path:+DeadTest.inlineRecord + addVariantCaseDeclaration IR DeadTest.res:158:20 path:+DeadTest.inlineRecord + addValueDeclaration +_ DeadTest.res:161:0 path:+DeadTest + addTypeReference DeadTest.res:163:20 --> DeadTest.res:158:20 + addValueReference DeadTest.res:163:27 --> DeadTest.res:160:4 + addTypeReference DeadTest.res:163:35 --> DeadTest.res:158:32 + addValueReference DeadTest.res:163:35 --> DeadTest.res:163:7 + addValueReference DeadTest.res:163:40 --> DeadTest.res:163:8 + addTypeReference DeadTest.res:163:7 --> DeadTest.res:158:40 + addValueReference DeadTest.res:162:9 --> DeadTest.res:161:8 + addRecordLabelDeclaration IR2.a DeadTest.res:167:26 path:+DeadTest.inlineRecord2 + addRecordLabelDeclaration IR2.b DeadTest.res:167:34 path:+DeadTest.inlineRecord2 + addVariantCaseDeclaration IR2 DeadTest.res:167:21 path:+DeadTest.inlineRecord2 + addRecordLabelDeclaration IR3.a DeadTest.res:169:34 path:+DeadTest.inlineRecord3 + addRecordLabelDeclaration IR3.b DeadTest.res:169:42 path:+DeadTest.inlineRecord3 + addVariantCaseDeclaration IR3 DeadTest.res:169:21 path:+DeadTest.inlineRecord3 addValueReference DeadTest.res:28:2 --> DeadTest.res:31:6 addValueReference DeadTest.res:36:2 --> DeadTest.res:39:6 addValueReference DeadTest.res:60:2 --> DeadTest.res:64:6 addValueReference DeadTest.res:61:2 --> DeadTest.res:63:6 - addValueReference DeadTest.res:101:2 --> DeadTest.res:103:2 - addTypeReference DeadTest.res:161:13 --> DeadTest.res:158:11 - addTypeReference DeadTest.res:158:11 --> DeadTest.res:161:13 + addTypeReference DeadTest.res:137:13 --> DeadTest.res:134:11 + addTypeReference DeadTest.res:134:11 --> DeadTest.res:137:13 addTypeReference DeadTest.res:38:11 --> DeadTest.res:35:11 addTypeReference DeadTest.res:35:11 --> DeadTest.res:38:11 Scanning DeadTestBlacklist.cmt Source:DeadTestBlacklist.res @@ -336,14 +342,13 @@ addTypeReference Docstrings.res:67:39 --> Docstrings.res:60:2 Scanning DynamicallyLoadedComponent.cmt Source:DynamicallyLoadedComponent.res addValueDeclaration +make DynamicallyLoadedComponent.res:2:4 path:+DynamicallyLoadedComponent + addRecordLabelDeclaration s DynamicallyLoadedComponent.res:2:12 path:+DynamicallyLoadedComponent.props addValueReference DynamicallyLoadedComponent.res:2:32 --> DynamicallyLoadedComponent.res:2:12 addValueReference DynamicallyLoadedComponent.res:2:19 --> React.res:7:0 + addTypeReference _none_:1:-1 --> DynamicallyLoadedComponent.res:2:12 Scanning EmptyArray.cmt Source:EmptyArray.res addValueDeclaration +make EmptyArray.res:5:6 path:+EmptyArray.Z - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: EmptyArray.res:6:5 - addValueReference EmptyArray.res:6:5 --> ReactDOMRe.res:8:0 addValueReference EmptyArray.res:10:9 --> EmptyArray.res:5:6 - addValueReference EmptyArray.res:10:9 --> React.res:18:0 Scanning ErrorHandler.cmt Source:ErrorHandler.res addValueDeclaration +notify ErrorHandler.res:7:6 path:+ErrorHandler.Make addValueDeclaration +x ErrorHandler.res:12:4 path:+ErrorHandler @@ -360,12 +365,6 @@ addValueDeclaration +x EverythingLiveHere.res:1:4 path:+EverythingLiveHere addValueDeclaration +y EverythingLiveHere.res:3:4 path:+EverythingLiveHere addValueDeclaration +z EverythingLiveHere.res:5:4 path:+EverythingLiveHere - Scanning FC.cmt Source:FC.res - addValueDeclaration +foo FC.res:6:4 path:+FC - addValueReference FC.res:7:13 --> FC.res:6:11 - addValueReference FC.res:6:4 --> FC.res:2:2 - addValueReference FC.res:6:4 --> FC.res:7:6 - addValueReference FC.res:11:7 --> FC.res:6:4 Scanning FirstClassModules.cmt Source:FirstClassModules.res addValueDeclaration +y FirstClassModules.res:23:6 path:+FirstClassModules.M addValueDeclaration +k FirstClassModules.res:29:8 path:+FirstClassModules.M.InnerModule2 @@ -411,132 +410,103 @@ Scanning Hooks.cmt Source:Hooks.res addValueDeclaration +make Hooks.res:4:4 path:+Hooks addValueDeclaration +default Hooks.res:25:4 path:+Hooks - addValueDeclaration +anotherComponent Hooks.res:28:4 path:+Hooks - addValueDeclaration +make Hooks.res:35:6 path:+Hooks.Inner - addValueDeclaration +anotherComponent Hooks.res:38:6 path:+Hooks.Inner - addValueDeclaration +make Hooks.res:42:8 path:+Hooks.Inner.Inner2 - addValueDeclaration +anotherComponent Hooks.res:45:8 path:+Hooks.Inner.Inner2 - addValueDeclaration +make Hooks.res:52:6 path:+Hooks.NoProps - addValueDeclaration +functionWithRenamedArgs Hooks.res:58:4 path:+Hooks - addValueDeclaration +componentWithRenamedArgs Hooks.res:64:4 path:+Hooks - addValueDeclaration +makeWithRef Hooks.res:70:4 path:+Hooks - addValueDeclaration +testForwardRef Hooks.res:80:4 path:+Hooks - addValueDeclaration +input Hooks.res:85:4 path:+Hooks - addValueDeclaration +polymorphicComponent Hooks.res:100:4 path:+Hooks - addValueDeclaration +functionReturningReactElement Hooks.res:103:4 path:+Hooks - addValueDeclaration +make Hooks.res:107:6 path:+Hooks.RenderPropRequiresConversion - addValueDeclaration +aComponentWithChildren Hooks.res:114:4 path:+Hooks + addValueDeclaration +make Hooks.res:29:6 path:+Hooks.Inner + addValueDeclaration +make Hooks.res:33:8 path:+Hooks.Inner.Inner2 + addValueDeclaration +make Hooks.res:39:6 path:+Hooks.NoProps + addValueDeclaration +functionWithRenamedArgs Hooks.res:45:4 path:+Hooks + addValueDeclaration +make Hooks.res:63:6 path:+Hooks.RenderPropRequiresConversion addRecordLabelDeclaration name Hooks.res:1:16 path:+Hooks.vehicle - addValueReference Hooks.res:5:26 --> React.res:167:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:7:3 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:8:5 + addRecordLabelDeclaration vehicle Hooks.res:4:12 path:+Hooks.props + addValueReference Hooks.res:5:26 --> React.res:145:0 + addTypeReference Hooks.res:10:29 --> Hooks.res:1:16 + addValueReference Hooks.res:10:29 --> Hooks.res:4:12 + addValueReference Hooks.res:10:75 --> Hooks.res:5:7 + addValueReference Hooks.res:9:7 --> React.res:7:0 addTypeReference Hooks.res:10:29 --> Hooks.res:1:16 addValueReference Hooks.res:10:29 --> Hooks.res:4:12 - addValueReference Hooks.res:10:76 --> Hooks.res:5:7 + addValueReference Hooks.res:10:75 --> Hooks.res:5:7 addValueReference Hooks.res:9:7 --> React.res:7:0 - addValueReference Hooks.res:8:5 --> ReactDOMRe.res:8:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames:props argNamesMaybe: Hooks.res:13:5 + addValueReference Hooks.res:13:54 --> React.res:7:0 + addValueReference Hooks.res:13:54 --> React.res:7:0 addValueReference Hooks.res:13:40 --> Hooks.res:5:7 addValueReference Hooks.res:13:26 --> Hooks.res:5:14 - addValueReference Hooks.res:13:54 --> React.res:7:0 - addValueReference Hooks.res:13:5 --> ReactDOMRe.res:8:0 - addValueReference Hooks.res:14:5 --> ImportHooks.res:13:0 - DeadOptionalArgs.addReferences ImportHooks.makeProps called with optional argNames: argNamesMaybe: Hooks.res:14:5 - addValueReference Hooks.res:14:5 --> React.res:3:0 - addValueReference Hooks.res:14:63 --> React.res:7:0 addValueReference Hooks.res:14:5 --> ImportHooks.res:13:0 addValueReference Hooks.res:15:7 --> React.res:7:0 addValueReference Hooks.res:15:32 --> React.res:7:0 - addValueReference Hooks.res:14:5 --> React.res:24:0 + addValueReference Hooks.res:15:7 --> React.res:7:0 + addValueReference Hooks.res:15:32 --> React.res:7:0 + addValueReference Hooks.res:14:76 --> Hooks.res:14:57 + addValueReference Hooks.res:14:63 --> React.res:7:0 addValueReference Hooks.res:17:5 --> ImportHookDefault.res:6:0 - DeadOptionalArgs.addReferences ImportHookDefault.makeProps called with optional argNames: argNamesMaybe: Hooks.res:17:5 - addValueReference Hooks.res:17:5 --> React.res:3:0 + addValueReference Hooks.res:19:7 --> React.res:7:0 + addValueReference Hooks.res:19:32 --> React.res:7:0 + addValueReference Hooks.res:19:7 --> React.res:7:0 + addValueReference Hooks.res:19:32 --> React.res:7:0 + addValueReference Hooks.res:18:74 --> Hooks.res:18:55 addValueReference Hooks.res:18:61 --> React.res:7:0 + addTypeReference Hooks.res:10:29 --> Hooks.res:1:16 + addValueReference Hooks.res:10:29 --> Hooks.res:4:12 + addValueReference Hooks.res:10:75 --> Hooks.res:5:7 + addValueReference Hooks.res:9:7 --> React.res:7:0 + addTypeReference Hooks.res:10:29 --> Hooks.res:1:16 + addValueReference Hooks.res:10:29 --> Hooks.res:4:12 + addValueReference Hooks.res:10:75 --> Hooks.res:5:7 + addValueReference Hooks.res:9:7 --> React.res:7:0 + addValueReference Hooks.res:13:54 --> React.res:7:0 + addValueReference Hooks.res:13:54 --> React.res:7:0 + addValueReference Hooks.res:13:40 --> Hooks.res:5:7 + addValueReference Hooks.res:13:26 --> Hooks.res:5:14 + addValueReference Hooks.res:14:5 --> ImportHooks.res:13:0 + addValueReference Hooks.res:15:7 --> React.res:7:0 + addValueReference Hooks.res:15:32 --> React.res:7:0 + addValueReference Hooks.res:15:7 --> React.res:7:0 + addValueReference Hooks.res:15:32 --> React.res:7:0 + addValueReference Hooks.res:14:76 --> Hooks.res:14:57 + addValueReference Hooks.res:14:63 --> React.res:7:0 addValueReference Hooks.res:17:5 --> ImportHookDefault.res:6:0 addValueReference Hooks.res:19:7 --> React.res:7:0 addValueReference Hooks.res:19:32 --> React.res:7:0 - addValueReference Hooks.res:17:5 --> React.res:24:0 - addValueReference Hooks.res:7:3 --> ReactDOMRe.res:8:0 + addValueReference Hooks.res:19:7 --> React.res:7:0 + addValueReference Hooks.res:19:32 --> React.res:7:0 + addValueReference Hooks.res:18:74 --> Hooks.res:18:55 + addValueReference Hooks.res:18:61 --> React.res:7:0 + addTypeReference _none_:1:-1 --> Hooks.res:4:12 addValueReference Hooks.res:25:4 --> Hooks.res:4:4 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:30:3 - addTypeReference Hooks.res:30:41 --> Hooks.res:1:16 - addValueReference Hooks.res:30:41 --> Hooks.res:28:24 - addValueReference Hooks.res:30:9 --> React.res:7:0 - addValueReference Hooks.res:30:3 --> ReactDOMRe.res:8:0 - addValueReference Hooks.res:29:2 --> Hooks.res:28:34 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:35:28 - addTypeReference Hooks.res:35:66 --> Hooks.res:1:16 - addValueReference Hooks.res:35:66 --> Hooks.res:35:14 - addValueReference Hooks.res:35:34 --> React.res:7:0 - addValueReference Hooks.res:35:28 --> ReactDOMRe.res:8:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:38:40 - addTypeReference Hooks.res:38:78 --> Hooks.res:1:16 - addValueReference Hooks.res:38:78 --> Hooks.res:38:26 - addValueReference Hooks.res:38:46 --> React.res:7:0 - addValueReference Hooks.res:38:40 --> ReactDOMRe.res:8:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:42:30 - addTypeReference Hooks.res:42:68 --> Hooks.res:1:16 - addValueReference Hooks.res:42:68 --> Hooks.res:42:16 - addValueReference Hooks.res:42:36 --> React.res:7:0 - addValueReference Hooks.res:42:30 --> ReactDOMRe.res:8:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:46:7 - addTypeReference Hooks.res:46:45 --> Hooks.res:1:16 - addValueReference Hooks.res:46:45 --> Hooks.res:45:28 - addValueReference Hooks.res:46:13 --> React.res:7:0 - addValueReference Hooks.res:46:7 --> ReactDOMRe.res:8:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:52:20 - addValueReference Hooks.res:52:25 --> React.res:3:0 - addValueReference Hooks.res:52:20 --> ReactDOMRe.res:8:0 - addTypeReference Hooks.res:60:2 --> Hooks.res:1:16 - addValueReference Hooks.res:58:4 --> Hooks.res:58:31 - addTypeReference Hooks.res:60:14 --> Hooks.res:1:16 - addValueReference Hooks.res:58:4 --> Hooks.res:58:37 - addValueReference Hooks.res:58:4 --> Hooks.res:58:31 - addValueReference Hooks.res:58:4 --> Hooks.res:58:45 - addTypeReference Hooks.res:66:15 --> Hooks.res:1:16 - addValueReference Hooks.res:66:15 --> Hooks.res:64:32 - addTypeReference Hooks.res:66:27 --> Hooks.res:1:16 - addValueReference Hooks.res:66:27 --> Hooks.res:64:38 - addValueReference Hooks.res:66:2 --> React.res:7:0 - addValueReference Hooks.res:65:6 --> Hooks.res:64:32 - addValueReference Hooks.res:65:2 --> Hooks.res:64:46 - addValueDeclaration +_ Hooks.res:71:2 path:+Hooks - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames:props argNamesMaybe: Hooks.res:74:20 - addValueReference Hooks.res:74:52 --> Hooks.res:74:11 - addValueReference Hooks.res:74:32 --> ReactDOM.res:47:2 - addTypeReference Hooks.res:74:73 --> Hooks.res:1:16 - addValueReference Hooks.res:74:73 --> Hooks.res:70:19 - addValueReference Hooks.res:74:60 --> React.res:7:0 - addValueReference Hooks.res:74:20 --> ReactDOMRe.res:8:0 - addValueReference Hooks.res:75:14 --> React.res:3:0 - addValueReference Hooks.res:73:11 --> Hooks.res:72:2 - addValueReference Hooks.res:80:4 --> Hooks.res:70:4 - addValueReference Hooks.res:80:4 --> React.res:90:0 - addRecordLabelDeclaration x Hooks.res:82:10 path:+Hooks.r - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames:props argNamesMaybe: Hooks.res:85:47 - addValueReference Hooks.res:85:66 --> Hooks.res:85:38 - addTypeReference Hooks.res:85:87 --> Hooks.res:82:10 - addValueReference Hooks.res:85:87 --> Hooks.res:85:30 - addValueReference Hooks.res:85:74 --> React.res:7:0 - addValueReference Hooks.res:85:47 --> ReactDOMRe.res:8:0 - addValueReference Hooks.res:85:4 --> React.res:90:0 - addTypeReference Hooks.res:100:58 --> Hooks.res:1:16 - addValueReference Hooks.res:100:58 --> Hooks.res:100:35 - addValueReference Hooks.res:100:45 --> React.res:7:0 - addValueReference Hooks.res:103:60 --> Hooks.res:103:37 - addValueReference Hooks.res:103:47 --> React.res:7:0 - addValueDeclaration +car Hooks.res:108:8 path:+Hooks.RenderPropRequiresConversion - addValueReference Hooks.res:109:30 --> Hooks.res:108:8 - addValueReference Hooks.res:109:18 --> Hooks.res:109:18 - addValueReference Hooks.res:109:4 --> Hooks.res:107:14 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:115:3 - addTypeReference Hooks.res:115:41 --> Hooks.res:1:16 - addValueReference Hooks.res:115:41 --> Hooks.res:114:30 - addValueReference Hooks.res:115:9 --> React.res:7:0 - DeadOptionalArgs.addReferences ReactDOMRe.createDOMElementVariadic called with optional argNames: argNamesMaybe: Hooks.res:115:57 - addValueReference Hooks.res:115:62 --> Hooks.res:114:40 - addValueReference Hooks.res:115:57 --> ReactDOMRe.res:8:0 - addValueReference Hooks.res:115:3 --> ReactDOMRe.res:8:0 + addRecordLabelDeclaration vehicle Hooks.res:29:14 path:+Hooks.Inner.props + addRecordLabelDeclaration vehicle Hooks.res:33:16 path:+Hooks.Inner.Inner2.props + addRecordLabelDeclaration vehicle Hooks.res:29:14 path:+Hooks.Inner.props + addTypeReference Hooks.res:29:66 --> Hooks.res:1:16 + addValueReference Hooks.res:29:66 --> Hooks.res:29:14 + addValueReference Hooks.res:29:34 --> React.res:7:0 + addTypeReference Hooks.res:29:66 --> Hooks.res:1:16 + addValueReference Hooks.res:29:66 --> Hooks.res:29:14 + addValueReference Hooks.res:29:34 --> React.res:7:0 + addTypeReference _none_:1:-1 --> Hooks.res:29:14 + addRecordLabelDeclaration vehicle Hooks.res:33:16 path:+Hooks.Inner.Inner2.props + addRecordLabelDeclaration vehicle Hooks.res:33:16 path:+Hooks.Inner.Inner2.props + addTypeReference Hooks.res:33:68 --> Hooks.res:1:16 + addValueReference Hooks.res:33:68 --> Hooks.res:33:16 + addValueReference Hooks.res:33:36 --> React.res:7:0 + addTypeReference Hooks.res:33:68 --> Hooks.res:1:16 + addValueReference Hooks.res:33:68 --> Hooks.res:33:16 + addValueReference Hooks.res:33:36 --> React.res:7:0 + addTypeReference _none_:1:-1 --> Hooks.res:33:16 + addValueReference Hooks.res:39:25 --> React.res:3:0 + addValueReference Hooks.res:39:25 --> React.res:3:0 + addTypeReference Hooks.res:47:2 --> Hooks.res:1:16 + addValueReference Hooks.res:45:4 --> Hooks.res:45:31 + addTypeReference Hooks.res:47:14 --> Hooks.res:1:16 + addValueReference Hooks.res:45:4 --> Hooks.res:45:37 + addValueReference Hooks.res:45:4 --> Hooks.res:45:31 + addValueReference Hooks.res:45:4 --> Hooks.res:45:45 + addRecordLabelDeclaration x Hooks.res:50:10 path:+Hooks.r + addRecordLabelDeclaration renderVehicle Hooks.res:63:14 path:+Hooks.RenderPropRequiresConversion.props + addRecordLabelDeclaration renderVehicle Hooks.res:63:14 path:+Hooks.RenderPropRequiresConversion.props + addValueDeclaration +car Hooks.res:64:8 path:+Hooks.RenderPropRequiresConversion + addValueReference Hooks.res:65:30 --> Hooks.res:64:8 + addValueReference Hooks.res:65:18 --> Hooks.res:65:18 + addValueReference Hooks.res:65:4 --> Hooks.res:63:14 + addTypeReference _none_:1:-1 --> Hooks.res:63:14 Scanning IgnoreInterface.cmt Source:IgnoreInterface.res Scanning IgnoreInterface.cmti Source:IgnoreInterface.resi Scanning ImmutableArray.cmt Source:ImmutableArray.res @@ -1009,16 +979,22 @@ addValueDeclaration +eq ImmutableArray.resi:110:0 path:ImmutableArray Scanning ImportHookDefault.cmt Source:ImportHookDefault.res addValueDeclaration +make ImportHookDefault.res:6:0 path:+ImportHookDefault - addValueDeclaration +make2 ImportHookDefault.res:13:0 path:+ImportHookDefault addRecordLabelDeclaration name ImportHookDefault.res:2:2 path:+ImportHookDefault.person addRecordLabelDeclaration age ImportHookDefault.res:3:2 path:+ImportHookDefault.person + addRecordLabelDeclaration person ImportHookDefault.res:8:2 path:+ImportHookDefault.props + addRecordLabelDeclaration children ImportHookDefault.res:9:2 path:+ImportHookDefault.props + addRecordLabelDeclaration renderMe ImportHookDefault.res:11:5 path:+ImportHookDefault.props Scanning ImportHooks.cmt Source:ImportHooks.res addValueDeclaration +make ImportHooks.res:13:0 path:+ImportHooks addValueDeclaration +foo ImportHooks.res:20:0 path:+ImportHooks addRecordLabelDeclaration name ImportHooks.res:3:2 path:+ImportHooks.person addRecordLabelDeclaration age ImportHooks.res:4:2 path:+ImportHooks.person + addRecordLabelDeclaration person ImportHooks.res:15:2 path:+ImportHooks.props + addRecordLabelDeclaration children ImportHooks.res:16:2 path:+ImportHooks.props + addRecordLabelDeclaration renderMe ImportHooks.res:18:5 path:+ImportHooks.props Scanning ImportIndex.cmt Source:ImportIndex.res addValueDeclaration +make ImportIndex.res:2:0 path:+ImportIndex + addRecordLabelDeclaration method ImportIndex.res:3:50 path:+ImportIndex.props Scanning ImportJsValue.cmt Source:ImportJsValue.res addValueDeclaration +round ImportJsValue.res:1:0 path:+ImportJsValue addValueDeclaration +area ImportJsValue.res:15:0 path:+ImportJsValue @@ -1219,9 +1195,7 @@ addValueReference OptArg.res:1:4 --> OptArg.res:1:29 addValueReference OptArg.res:3:4 --> OptArg.res:3:17 addValueReference OptArg.res:3:4 --> OptArg.res:3:27 - DeadOptionalArgs.addReferences foo called with optional argNames:x argNamesMaybe: OptArg.res:5:7 addValueReference OptArg.res:5:7 --> OptArg.res:1:4 - DeadOptionalArgs.addReferences bar called with optional argNames: argNamesMaybe: OptArg.res:7:7 addValueReference OptArg.res:7:7 --> OptArg.res:3:4 addValueReference OptArg.res:9:4 --> OptArg.res:9:20 addValueReference OptArg.res:9:4 --> OptArg.res:9:26 @@ -1230,25 +1204,20 @@ addValueReference OptArg.res:9:4 --> OptArg.res:9:23 addValueReference OptArg.res:9:4 --> OptArg.res:9:29 addValueReference OptArg.res:9:4 --> OptArg.res:9:35 - DeadOptionalArgs.addReferences threeArgs called with optional argNames:c, a argNamesMaybe: OptArg.res:11:7 addValueReference OptArg.res:11:7 --> OptArg.res:9:4 - DeadOptionalArgs.addReferences threeArgs called with optional argNames:a argNamesMaybe: OptArg.res:12:7 addValueReference OptArg.res:12:7 --> OptArg.res:9:4 addValueReference OptArg.res:14:4 --> OptArg.res:14:18 addValueReference OptArg.res:14:4 --> OptArg.res:14:24 addValueReference OptArg.res:14:4 --> OptArg.res:14:15 addValueReference OptArg.res:14:4 --> OptArg.res:14:21 addValueReference OptArg.res:14:4 --> OptArg.res:14:27 - DeadOptionalArgs.addReferences twoArgs called with optional argNames: argNamesMaybe: OptArg.res:16:12 addValueReference OptArg.res:16:12 --> OptArg.res:14:4 addValueReference OptArg.res:18:4 --> OptArg.res:18:17 addValueReference OptArg.res:18:4 --> OptArg.res:18:14 addValueReference OptArg.res:18:4 --> OptArg.res:18:24 - DeadOptionalArgs.addReferences oneArg called with optional argNames:a argNamesMaybe:a OptArg.res:20:30 addValueReference OptArg.res:20:4 --> OptArg.res:20:18 addValueReference OptArg.res:20:4 --> OptArg.res:20:24 addValueReference OptArg.res:20:4 --> OptArg.res:18:4 - DeadOptionalArgs.addReferences wrapOneArg called with optional argNames:a argNamesMaybe: OptArg.res:22:7 addValueReference OptArg.res:22:7 --> OptArg.res:20:4 addValueReference OptArg.res:24:4 --> OptArg.res:24:19 addValueReference OptArg.res:24:4 --> OptArg.res:24:25 @@ -1259,20 +1228,15 @@ addValueReference OptArg.res:24:4 --> OptArg.res:24:28 addValueReference OptArg.res:24:4 --> OptArg.res:24:34 addValueReference OptArg.res:24:4 --> OptArg.res:24:40 - DeadOptionalArgs.addReferences fourArgs called with optional argNames:c, b, a argNamesMaybe:c, b, a OptArg.res:26:44 addValueReference OptArg.res:26:4 --> OptArg.res:26:20 addValueReference OptArg.res:26:4 --> OptArg.res:26:26 addValueReference OptArg.res:26:4 --> OptArg.res:26:32 addValueReference OptArg.res:26:4 --> OptArg.res:26:38 addValueReference OptArg.res:26:4 --> OptArg.res:24:4 - DeadOptionalArgs.addReferences wrapfourArgs called with optional argNames:c, a argNamesMaybe: OptArg.res:28:7 addValueReference OptArg.res:28:7 --> OptArg.res:26:4 - DeadOptionalArgs.addReferences wrapfourArgs called with optional argNames:c, b argNamesMaybe: OptArg.res:29:7 addValueReference OptArg.res:29:7 --> OptArg.res:26:4 addValueReference OptArg.resi:1:0 --> OptArg.res:1:4 - OptionalArgs.addFunctionReference OptArg.resi:1:0 OptArg.res:1:4 addValueReference OptArg.resi:2:0 --> OptArg.res:3:4 - OptionalArgs.addFunctionReference OptArg.resi:2:0 OptArg.res:3:4 Scanning OptArg.cmti Source:OptArg.resi addValueDeclaration +foo OptArg.resi:1:0 path:OptArg addValueDeclaration +bar OptArg.resi:2:0 path:OptArg @@ -1474,12 +1438,10 @@ addValueDeclaration +bar TestOptArg.res:5:4 path:+TestOptArg addValueDeclaration +notSuppressesOptArgs TestOptArg.res:9:4 path:+TestOptArg addValueDeclaration +liveSuppressesOptArgs TestOptArg.res:14:4 path:+TestOptArg - DeadOptionalArgs.addReferences OptArg.bar called with optional argNames:z argNamesMaybe: TestOptArg.res:1:7 addValueReference TestOptArg.res:1:7 --> OptArg.resi:2:0 addValueReference TestOptArg.res:3:4 --> TestOptArg.res:3:14 addValueReference TestOptArg.res:3:4 --> TestOptArg.res:3:11 addValueReference TestOptArg.res:3:4 --> TestOptArg.res:3:17 - DeadOptionalArgs.addReferences foo called with optional argNames:x argNamesMaybe: TestOptArg.res:5:16 addValueReference TestOptArg.res:5:4 --> TestOptArg.res:3:4 addValueReference TestOptArg.res:7:7 --> TestOptArg.res:5:4 addValueReference TestOptArg.res:9:4 --> TestOptArg.res:9:31 @@ -1489,7 +1451,6 @@ addValueReference TestOptArg.res:9:4 --> TestOptArg.res:9:34 addValueReference TestOptArg.res:9:4 --> TestOptArg.res:9:40 addValueReference TestOptArg.res:9:4 --> TestOptArg.res:9:46 - DeadOptionalArgs.addReferences notSuppressesOptArgs called with optional argNames: argNamesMaybe: TestOptArg.res:11:8 addValueReference TestOptArg.res:11:8 --> TestOptArg.res:9:4 addValueReference TestOptArg.res:14:4 --> TestOptArg.res:14:32 addValueReference TestOptArg.res:14:4 --> TestOptArg.res:14:38 @@ -1498,7 +1459,6 @@ addValueReference TestOptArg.res:14:4 --> TestOptArg.res:14:35 addValueReference TestOptArg.res:14:4 --> TestOptArg.res:14:41 addValueReference TestOptArg.res:14:4 --> TestOptArg.res:14:47 - DeadOptionalArgs.addReferences liveSuppressesOptArgs called with optional argNames:x argNamesMaybe: TestOptArg.res:16:8 addValueReference TestOptArg.res:16:8 --> TestOptArg.res:14:4 Scanning TestPromise.cmt Source:TestPromise.res addValueDeclaration +convert TestPromise.res:14:4 path:+TestPromise @@ -1573,17 +1533,16 @@ addValueDeclaration +selfRecursiveConverter Types.res:42:4 path:+Types addValueDeclaration +mutuallyRecursiveConverter Types.res:49:4 path:+Types addValueDeclaration +testFunctionOnOptionsAsArgument Types.res:52:4 path:+Types - addValueDeclaration +stringT Types.res:60:4 path:+Types - addValueDeclaration +jsStringT Types.res:63:4 path:+Types - addValueDeclaration +jsString2T Types.res:66:4 path:+Types - addValueDeclaration +jsonStringify Types.res:78:4 path:+Types - addValueDeclaration +testConvertNull Types.res:92:4 path:+Types - addValueDeclaration +testMarshalFields Types.res:112:4 path:+Types - addValueDeclaration +setMatch Types.res:128:4 path:+Types - addValueDeclaration +testInstantiateTypeParameter Types.res:138:4 path:+Types - addValueDeclaration +currentTime Types.res:147:4 path:+Types - addValueDeclaration +i64Const Types.res:156:4 path:+Types - addValueDeclaration +optFunction Types.res:159:4 path:+Types + addValueDeclaration +jsStringT Types.res:60:4 path:+Types + addValueDeclaration +jsString2T Types.res:63:4 path:+Types + addValueDeclaration +jsonStringify Types.res:75:4 path:+Types + addValueDeclaration +testConvertNull Types.res:89:4 path:+Types + addValueDeclaration +testMarshalFields Types.res:109:4 path:+Types + addValueDeclaration +setMatch Types.res:125:4 path:+Types + addValueDeclaration +testInstantiateTypeParameter Types.res:135:4 path:+Types + addValueDeclaration +currentTime Types.res:144:4 path:+Types + addValueDeclaration +i64Const Types.res:153:4 path:+Types + addValueDeclaration +optFunction Types.res:156:4 path:+Types addVariantCaseDeclaration A Types.res:12:2 path:+Types.typeWithVars addVariantCaseDeclaration B Types.res:13:2 path:+Types.typeWithVars addValueReference Types.res:23:8 --> Types.res:23:16 @@ -1603,14 +1562,14 @@ addValueReference Types.res:52:4 --> Types.res:52:54 addVariantCaseDeclaration A Types.res:56:2 path:+Types.opaqueVariant addVariantCaseDeclaration B Types.res:57:2 path:+Types.opaqueVariant - addRecordLabelDeclaration i Types.res:87:2 path:+Types.record - addRecordLabelDeclaration s Types.res:88:2 path:+Types.record - addValueReference Types.res:92:4 --> Types.res:92:23 - addValueReference Types.res:112:4 --> Types.res:112:39 - addValueReference Types.res:128:4 --> Types.res:128:16 - addRecordLabelDeclaration id Types.res:133:19 path:+Types.someRecord - addValueReference Types.res:138:4 --> Types.res:138:36 - addValueDeclaration +x Types.res:166:6 path:+Types.ObjectId + addRecordLabelDeclaration i Types.res:84:2 path:+Types.record + addRecordLabelDeclaration s Types.res:85:2 path:+Types.record + addValueReference Types.res:89:4 --> Types.res:89:23 + addValueReference Types.res:109:4 --> Types.res:109:39 + addValueReference Types.res:125:4 --> Types.res:125:16 + addRecordLabelDeclaration id Types.res:130:19 path:+Types.someRecord + addValueReference Types.res:135:4 --> Types.res:135:36 + addValueDeclaration +x Types.res:163:6 path:+Types.ObjectId Scanning Unboxed.cmt Source:Unboxed.res addValueDeclaration +testV1 Unboxed.res:8:4 path:+Unboxed addValueDeclaration +r2Test Unboxed.res:17:4 path:+Unboxed @@ -1690,16 +1649,16 @@ addValueReference Unison.res:26:8 --> Unison.res:26:20 addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:19:8 - addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:20 + addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:8 addValueReference Unison.res:26:8 --> Unison.res:28:17 - addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:20 + addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:8 addValueReference Unison.res:26:8 --> Unison.res:28:17 - addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:20 + addValueReference Unison.res:26:8 --> Unison.res:28:23 addValueReference Unison.res:26:8 --> Unison.res:26:8 addValueReference Unison.res:26:8 --> Unison.res:28:10 addTypeReference Unison.res:28:9 --> Unison.res:9:2 @@ -1708,13 +1667,11 @@ addTypeReference Unison.res:37:20 --> Unison.res:14:2 addValueReference Unison.res:37:0 --> Unison.res:26:8 addTypeReference Unison.res:38:20 --> Unison.res:15:2 - DeadOptionalArgs.addReferences group called with optional argNames:break argNamesMaybe: Unison.res:38:25 addTypeReference Unison.res:38:38 --> Unison.res:5:2 addValueReference Unison.res:38:25 --> Unison.res:17:4 addTypeReference Unison.res:38:53 --> Unison.res:14:2 addValueReference Unison.res:38:0 --> Unison.res:26:8 addTypeReference Unison.res:39:20 --> Unison.res:15:2 - DeadOptionalArgs.addReferences group called with optional argNames:break argNamesMaybe: Unison.res:39:25 addTypeReference Unison.res:39:38 --> Unison.res:6:2 addValueReference Unison.res:39:25 --> Unison.res:17:4 addTypeReference Unison.res:39:52 --> Unison.res:14:2 @@ -1811,6 +1768,9 @@ addValueReference VariantsWithPayload.res:93:4 --> VariantsWithPayload.res:93:23 addVariantCaseDeclaration R VariantsWithPayload.res:96:22 path:+VariantsWithPayload.variant1Object addValueReference VariantsWithPayload.res:99:4 --> VariantsWithPayload.res:99:26 + Implementation 0 + Implementation 0 + Implementation 0 addValueReference TestDeadExn.res:1:7 --> DeadExn.res:1:0 File References @@ -1818,7 +1778,7 @@ File References AutoAnnotate.res -->> BootloaderResource.res -->> BucklescriptAnnotations.res -->> - ComponentAsProp.res -->> React.res, ReactDOMRe.res + ComponentAsProp.res -->> React.res CreateErrorHandler1.res -->> ErrorHandler.resi CreateErrorHandler2.res -->> DeadCodeImplementation.res -->> @@ -1827,7 +1787,7 @@ File References DeadExn.resi -->> DeadRT.res -->> DeadRT.resi -->> - DeadTest.res -->> React.res, BootloaderResource.res, DeadValueTest.resi, DynamicallyLoadedComponent.res, ImmutableArray.resi, JSResource.res + DeadTest.res -->> React.res, DeadValueTest.resi, DynamicallyLoadedComponent.res, ImmutableArray.resi DeadTestBlacklist.res -->> DeadTestWithInterface.res -->> DeadTypeTest.res -->> @@ -1836,15 +1796,14 @@ File References DeadValueTest.resi -->> DeadValueTest.res Docstrings.res -->> DynamicallyLoadedComponent.res -->> React.res - EmptyArray.res -->> React.res, ReactDOMRe.res + EmptyArray.res -->> ErrorHandler.res -->> ErrorHandler.resi -->> ErrorHandler.res EverythingLiveHere.res -->> - FC.res -->> FirstClassModules.res -->> FirstClassModulesInterface.res -->> FirstClassModulesInterface.resi -->> FirstClassModulesInterface.res - Hooks.res -->> React.res, ReactDOM.res, ReactDOMRe.res, ImportHookDefault.res, ImportHooks.res + Hooks.res -->> React.res, ImportHookDefault.res, ImportHooks.res IgnoreInterface.res -->> IgnoreInterface.resi -->> ImmutableArray.res -->> @@ -1908,13 +1867,16 @@ File References Dead VariantCase +AutoAnnotate.variant.R: 0 references () [0] Dead Value +BucklescriptAnnotations.+bar: 0 references () [1] Dead Value +BucklescriptAnnotations.+f: 0 references () [0] + Live RecordLabel +ComponentAsProp.props.button: 1 references (_none_:1:-1) [0] + Live RecordLabel +ComponentAsProp.props.description: 1 references (_none_:1:-1) [0] + Live RecordLabel +ComponentAsProp.props.title: 1 references (_none_:1:-1) [0] Live Value +ComponentAsProp.+make: 0 references () [0] Live Value +CreateErrorHandler1.Error1.+notification: 1 references (ErrorHandler.resi:3:2) [0] Live Value +CreateErrorHandler2.Error2.+notification: 1 references (ErrorHandler.resi:3:2) [0] Live Value +DeadCodeImplementation.M.+x: 1 references (DeadCodeInterface.res:2:2) [0] Dead Value +DeadRT.+emitModuleAccessPath: 0 references () [0] Live VariantCase +DeadRT.moduleAccessPath.Kaboom: 1 references (DeadRT.res:11:16) [0] - Live VariantCase DeadRT.moduleAccessPath.Root: 1 references (DeadTest.res:106:16) [1] + Live VariantCase DeadRT.moduleAccessPath.Root: 1 references (DeadTest.res:98:16) [1] Live VariantCase +DeadRT.moduleAccessPath.Root: 1 references (DeadRT.resi:2:2) [0] Live VariantCase DeadRT.moduleAccessPath.Kaboom: 1 references (DeadRT.res:3:2) [0] Dead RecordLabel +DeadTest.inlineRecord3.IR3.b: 0 references () [0] @@ -1924,37 +1886,34 @@ File References Dead RecordLabel +DeadTest.inlineRecord2.IR2.a: 0 references () [0] Dead VariantCase +DeadTest.inlineRecord2.IR2: 0 references () [0] Dead Value +DeadTest.+_: 0 references () [0] - Live Value +DeadTest.+ira: 1 references (DeadTest.res:187:27) [0] + Live Value +DeadTest.+ira: 1 references (DeadTest.res:163:27) [0] Live RecordLabel +DeadTest.inlineRecord.IR.e: 0 references () [0] Dead RecordLabel +DeadTest.inlineRecord.IR.d: 0 references () [0] - Live RecordLabel +DeadTest.inlineRecord.IR.c: 1 references (DeadTest.res:187:7) [0] - Live RecordLabel +DeadTest.inlineRecord.IR.b: 1 references (DeadTest.res:187:35) [0] + Live RecordLabel +DeadTest.inlineRecord.IR.c: 1 references (DeadTest.res:163:7) [0] + Live RecordLabel +DeadTest.inlineRecord.IR.b: 1 references (DeadTest.res:163:35) [0] Dead RecordLabel +DeadTest.inlineRecord.IR.a: 0 references () [0] - Live VariantCase +DeadTest.inlineRecord.IR: 1 references (DeadTest.res:187:20) [0] + Live VariantCase +DeadTest.inlineRecord.IR: 1 references (DeadTest.res:163:20) [0] Dead Value +DeadTest.+_: 0 references () [0] - Live Value +DeadTest.+deadIncorrect: 1 references (DeadTest.res:180:8) [0] + Live Value +DeadTest.+deadIncorrect: 1 references (DeadTest.res:156:8) [0] Dead RecordLabel +DeadTest.rc.a: 0 references () [0] Dead Value +DeadTest.+funWithInnerVars: 0 references () [1] Dead Value +DeadTest.+y: 0 references () [0] Dead Value +DeadTest.+x: 0 references () [0] - Live VariantCase +DeadTest.WithInclude.t.A: 1 references (DeadTest.res:166:7) [1] - Live VariantCase +DeadTest.WithInclude.t.A: 1 references (DeadTest.res:158:11) [0] + Live VariantCase +DeadTest.WithInclude.t.A: 1 references (DeadTest.res:142:7) [1] + Live VariantCase +DeadTest.WithInclude.t.A: 1 references (DeadTest.res:134:11) [0] Live Value +DeadTest.GloobLive.+globallyLive3: 0 references () [0] Live Value +DeadTest.GloobLive.+globallyLive2: 0 references () [0] Live Value +DeadTest.GloobLive.+globallyLive1: 0 references () [0] Dead Value +DeadTest.+stringLengthNoSideEffects: 0 references () [0] Dead Value +DeadTest.+theSideEffectIsLogging: 0 references () [0] - Live Value +DeadTest.+make: 1 references (DeadTest.res:143:16) [0] + Live RecordLabel +DeadTest.props.s: 1 references (_none_:1:-1) [0] + Live Value +DeadTest.+make: 1 references (DeadTest.res:119:16) [0] Dead Value +DeadTest.+deadRef: 0 references () [0] - Dead Value +DeadTest.+minute: 0 references () [0] Dead Value +DeadTest.+second: 0 references () [0] Dead Value +DeadTest.+a3: 0 references () [0] Dead Value +DeadTest.+a2: 0 references () [0] Dead Value +DeadTest.+a1: 0 references () [0] Dead Value +DeadTest.+zzz: 0 references () [0] - Dead Value +DeadTest.LazyDynamicallyLoadedComponent2.+make: 0 references () [0] - Dead Value +DeadTest.LazyDynamicallyLoadedComponent2.+makeProps: 0 references () [0] - Dead Value +DeadTest.LazyDynamicallyLoadedComponent2.+reasonResource: 0 references () [0] Dead Value +DeadTest.+withDefaultValue: 0 references () [0] Dead Value +DeadTest.+bar: 0 references () [0] Dead Value +DeadTest.+foo: 0 references () [1] @@ -2029,7 +1988,6 @@ File References Dead Value +EverythingLiveHere.+z: 0 references () [0] Dead Value +EverythingLiveHere.+y: 0 references () [0] Dead Value +EverythingLiveHere.+x: 0 references () [0] - Live Value +FC.+foo: 1 references (FC.res:11:7) [0] Live Value +FirstClassModules.+someFunctorAsFunction: 0 references () [0] Live Value +FirstClassModules.SomeFunctor.+ww: 1 references (FirstClassModules.res:57:2) [0] Live Value +FirstClassModules.+testConvert: 0 references () [0] @@ -2042,27 +2000,21 @@ File References Dead Value FirstClassModulesInterface.+r: 0 references () [0] Dead RecordLabel FirstClassModulesInterface.record.y: 0 references () [0] Dead RecordLabel FirstClassModulesInterface.record.x: 0 references () [0] - Live Value +Hooks.+aComponentWithChildren: 0 references () [0] - Live Value +Hooks.RenderPropRequiresConversion.+car: 1 references (Hooks.res:109:30) [0] + Live Value +Hooks.RenderPropRequiresConversion.+car: 1 references (Hooks.res:65:30) [0] + Live RecordLabel +Hooks.RenderPropRequiresConversion.props.renderVehicle: 1 references (_none_:1:-1) [0] Live Value +Hooks.RenderPropRequiresConversion.+make: 0 references () [0] - Live Value +Hooks.+functionReturningReactElement: 0 references () [0] - Live Value +Hooks.+polymorphicComponent: 0 references () [0] - Live Value +Hooks.+input: 0 references () [0] - Live RecordLabel +Hooks.r.x: 1 references (Hooks.res:85:87) [0] - Live Value +Hooks.+testForwardRef: 0 references () [0] - Dead Value +Hooks.+_: 0 references () [0] - Live Value +Hooks.+makeWithRef: 1 references (Hooks.res:80:4) [0] - Live Value +Hooks.+componentWithRenamedArgs: 0 references () [0] + Dead RecordLabel +Hooks.r.x: 0 references () [0] Live Value +Hooks.+functionWithRenamedArgs: 0 references () [0] Live Value +Hooks.NoProps.+make: 0 references () [0] - Live Value +Hooks.Inner.Inner2.+anotherComponent: 0 references () [0] + Live RecordLabel +Hooks.Inner.Inner2.props.vehicle: 1 references (_none_:1:-1) [0] Live Value +Hooks.Inner.Inner2.+make: 0 references () [0] - Live Value +Hooks.Inner.+anotherComponent: 0 references () [0] + Live RecordLabel +Hooks.Inner.props.vehicle: 1 references (_none_:1:-1) [0] Live Value +Hooks.Inner.+make: 0 references () [0] - Live Value +Hooks.+anotherComponent: 0 references () [0] Live Value +Hooks.+default: 0 references () [0] + Live RecordLabel +Hooks.props.vehicle: 1 references (_none_:1:-1) [0] Live Value +Hooks.+make: 1 references (Hooks.res:25:4) [0] - Live RecordLabel +Hooks.vehicle.name: 13 references (Hooks.res:10:29, Hooks.res:30:41, Hooks.res:35:66, Hooks.res:38:78, Hooks.res:42:68, Hooks.res:46:45, Hooks.res:60:2, Hooks.res:60:14, Hooks.res:66:15, Hooks.res:66:27, Hooks.res:74:73, Hooks.res:100:58, Hooks.res:115:41) [0] + Live RecordLabel +Hooks.vehicle.name: 5 references (Hooks.res:10:29, Hooks.res:29:66, Hooks.res:33:68, Hooks.res:47:2, Hooks.res:47:14) [0] + Live RecordLabel +ImportIndex.props.method: 0 references () [0] Live Value +ImportIndex.+make: 0 references () [0] Dead Value +ImportMyBanner.+make: 0 references () [0] Live Value +ImportMyBanner.+make: 0 references () [0] @@ -2262,7 +2214,6 @@ File References Live Value +Types.+jsonStringify: 0 references () [0] Live Value +Types.+jsString2T: 0 references () [0] Live Value +Types.+jsStringT: 0 references () [0] - Live Value +Types.+stringT: 0 references () [0] Dead VariantCase +Types.opaqueVariant.B: 0 references () [0] Dead VariantCase +Types.opaqueVariant.A: 0 references () [0] Live Value +Types.+testFunctionOnOptionsAsArgument: 0 references () [0] @@ -2367,7 +2318,8 @@ File References Dead VariantCase +DeadTypeTest.t.B: 0 references () [0] Dead Value DeadValueTest.+valueDead: 0 references () [0] Live Value DeadValueTest.+valueAlive: 1 references (DeadTest.res:73:16) [0] - Live Value +DynamicallyLoadedComponent.+make: 1 references (DeadTest.res:133:17) [0] + Live RecordLabel +DynamicallyLoadedComponent.props.s: 1 references (_none_:1:-1) [0] + Live Value +DynamicallyLoadedComponent.+make: 1 references (DeadTest.res:110:17) [0] Dead Value ErrorHandler.+x: 0 references () [0] Live Value ErrorHandler.Make.+notify: 1 references (CreateErrorHandler1.res:8:0) [0] Dead Value +FirstClassModulesInterface.+r: 0 references () [0] @@ -2434,11 +2386,16 @@ File References Dead Value ImmutableArray.+toArray: 0 references () [0] Live Value ImmutableArray.+fromArray: 1 references (DeadTest.res:1:15) [0] Live Value ImmutableArray.Array.+get: 1 references (TestImmutableArray.res:2:4) [0] - Live Value +ImportHookDefault.+make2: 0 references () [0] + Live RecordLabel +ImportHookDefault.props.renderMe: 0 references () [0] + Live RecordLabel +ImportHookDefault.props.children: 0 references () [0] + Live RecordLabel +ImportHookDefault.props.person: 0 references () [0] Live Value +ImportHookDefault.+make: 1 references (Hooks.res:17:5) [0] Dead RecordLabel +ImportHookDefault.person.age: 0 references () [0] Dead RecordLabel +ImportHookDefault.person.name: 0 references () [0] Live Value +ImportHooks.+foo: 0 references () [0] + Live RecordLabel +ImportHooks.props.renderMe: 0 references () [0] + Live RecordLabel +ImportHooks.props.children: 0 references () [0] + Live RecordLabel +ImportHooks.props.person: 0 references () [0] Live Value +ImportHooks.+make: 1 references (Hooks.res:14:5) [0] Dead RecordLabel +ImportHooks.person.age: 0 references () [0] Dead RecordLabel +ImportHooks.person.name: 0 references () [0] @@ -2541,73 +2498,9 @@ File References Live Value +OptArg.+foo: 1 references (OptArg.res:5:7) [0] Incorrect Dead Annotation - DeadTest.res:178:1-22 + DeadTest.res:153:1-28 deadIncorrect is annotated @dead but is live - Warning Unused Argument - TestOptArg.res:9:1-65 - optional argument x of function notSuppressesOptArgs is never used - - Warning Unused Argument - TestOptArg.res:9:1-65 - optional argument y of function notSuppressesOptArgs is never used - - Warning Unused Argument - TestOptArg.res:9:1-65 - optional argument z of function notSuppressesOptArgs is never used - - Warning Redundant Optional Argument - TestOptArg.res:3:1-28 - optional argument x of function foo is always supplied (1 calls) - - Warning Redundant Optional Argument - Unison.res:17:1-60 - optional argument break of function group is always supplied (2 calls) - - Warning Unused Argument - OptArg.resi:2:1-50 - optional argument x of function bar is never used - - Warning Redundant Optional Argument - OptArg.res:26:1-70 - optional argument c of function wrapfourArgs is always supplied (2 calls) - - Warning Unused Argument - OptArg.res:24:1-63 - optional argument d of function fourArgs is never used - - Warning Redundant Optional Argument - OptArg.res:20:1-51 - optional argument a of function wrapOneArg is always supplied (1 calls) - - Warning Unused Argument - OptArg.res:14:1-42 - optional argument a of function twoArgs is never used - - Warning Unused Argument - OptArg.res:14:1-42 - optional argument b of function twoArgs is never used - - Warning Unused Argument - OptArg.res:9:1-54 - optional argument b of function threeArgs is never used - - Warning Redundant Optional Argument - OptArg.res:9:1-54 - optional argument a of function threeArgs is always supplied (2 calls) - - Warning Unused Argument - OptArg.res:3:1-38 - optional argument x of function bar is never used - - Warning Unused Argument - OptArg.res:1:1-48 - optional argument y of function foo is never used - - Warning Unused Argument - OptArg.res:1:1-48 - optional argument z of function foo is never used - Warning Dead Module AutoAnnotate.res:0:1 AutoAnnotate is a dead module as all its items are dead. @@ -2758,70 +2651,44 @@ File References <-- line 96 @dead("withDefaultValue") let withDefaultValue = (~paramWithDefault=3, y) => paramWithDefault + y - Warning Dead Module - DeadTest.res:110:8-413 - DeadTest.LazyDynamicallyLoadedComponent2 is a dead module as all its items are dead. - - Warning Dead Value With Side Effects - DeadTest.res:111:3-142 - LazyDynamicallyLoadedComponent2.reasonResource is never used and could have side effects - - Warning Dead Value - DeadTest.res:114:3-54 - LazyDynamicallyLoadedComponent2.makeProps is never used - <-- line 114 - @dead("LazyDynamicallyLoadedComponent2.makeProps") let makeProps = DynamicallyLoadedComponent.makeProps - - Warning Dead Value - DeadTest.res:115:3-170 - LazyDynamicallyLoadedComponent2.make is never used - <-- line 115 - @dead("LazyDynamicallyLoadedComponent2.make") let make = props => - Warning Dead Value - DeadTest.res:127:1-52 + DeadTest.res:104:1-52 zzz is never used - <-- line 127 + <-- line 104 @dead("zzz") let zzz = { Warning Dead Value - DeadTest.res:135:1-15 + DeadTest.res:112:1-14 second is never used - <-- line 135 - @dead("second") let second = 1L - - Warning Dead Value - DeadTest.res:136:1-35 - minute is never used - <-- line 136 - @dead("minute") let minute = Int64.mul(60L, second) + <-- line 112 + @dead("second") let second = 1 Warning Dead Value - DeadTest.res:138:1-21 + DeadTest.res:114:1-21 deadRef is never used - <-- line 138 + <-- line 114 @dead("deadRef") let deadRef = ref(12) Warning Dead Value With Side Effects - DeadTest.res:145:1-40 + DeadTest.res:121:1-40 theSideEffectIsLogging is never used and could have side effects Warning Dead Value - DeadTest.res:147:1-54 + DeadTest.res:123:1-54 stringLengthNoSideEffects is never used - <-- line 147 + <-- line 123 @dead("stringLengthNoSideEffects") let stringLengthNoSideEffects = String.length("sdkdl") Warning Dead Type - DeadTest.res:175:12-17 + DeadTest.res:151:12-17 rc.a is a record label never used to read a value - <-- line 175 + <-- line 151 type rc = {@dead("rc.a") a: int} Warning Dead Type - DeadTest.res:182:25-30 + DeadTest.res:158:25-30 inlineRecord.IR.a is a record label never used to read a value - <-- line 182 + <-- line 158 type inlineRecord = IR({@dead("inlineRecord.IR.a") a: int, b: int, c: string, @dead d: int, @live e: int}) Warning Dead Module @@ -2921,10 +2788,10 @@ File References ErrorHandler is a dead module as all its items are dead. Warning Dead Value - ErrorHandler.res:12:1-10 + ErrorHandler.res:11:1-19 x is never used <-- line 12 - @dead("x") let x = 42 + @dead("x") @genType Warning Dead Module ErrorHandler.resi:0:1 @@ -3002,6 +2869,12 @@ File References <-- line 7 @dead("r") let r: record + Warning Dead Type + Hooks.res:50:11-19 + r.x is a record label never used to read a value + <-- line 50 + type r = {@dead("r.x") x: string} + Warning Dead Value ImmutableArray.res:16:3-41 toArray is never used @@ -4159,31 +4032,31 @@ File References | @dead("opaqueVariant.B") B Warning Dead Type - Types.res:87:3-8 + Types.res:84:3-8 record.i is a record label never used to read a value - <-- line 87 + <-- line 84 @dead("record.i") i: int, Warning Dead Type - Types.res:88:3-11 + Types.res:85:3-11 record.s is a record label never used to read a value - <-- line 88 + <-- line 85 @dead("record.s") s: string, Warning Dead Type - Types.res:133:20-26 + Types.res:130:20-26 someRecord.id is a record label never used to read a value - <-- line 133 + <-- line 130 type someRecord = {@dead("someRecord.id") id: int} Warning Dead Module - Types.res:161:8-79 + Types.res:158:8-79 Types.ObjectId is a dead module as all its items are dead. Warning Dead Value - Types.res:166:3-11 + Types.res:163:3-11 ObjectId.x is never used - <-- line 166 + <-- line 163 @dead("ObjectId.x") let x = 1 Warning Dead Type @@ -4294,4 +4167,4 @@ File References <-- line 96 type variant1Object = | @dead("variant1Object.R") R(payload) - Analysis reported 306 issues (Incorrect Dead Annotation:1, Warning Dead Exception:2, Warning Dead Module:22, Warning Dead Type:86, Warning Dead Value:177, Warning Dead Value With Side Effects:2, Warning Redundant Optional Argument:5, Warning Unused Argument:11) + Analysis reported 286 issues (Incorrect Dead Annotation:1, Warning Dead Exception:2, Warning Dead Module:21, Warning Dead Type:87, Warning Dead Value:174, Warning Dead Value With Side Effects:1) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt b/tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt index 171a115010..4cdad9295c 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt +++ b/tests/analysis_tests/tests-reanalyze/deadcode/expected/exception.txt @@ -17,111 +17,79 @@ callsRaiseWithAnnotationAndIsAnnotated might raise Not_found (Exn.res:22:45) and is annotated with redundant @raises(A) Exception Analysis - Exn.res:24:5 - z might raise Failure (Exn.res:24:8) and is not annotated with @raises(Failure) + Exn.res:24:5-19 + incompleteMatch might raise Match_failure (Exn.res:25:2) and is not annotated with @raises(Match_failure) Exception Analysis - Exn.res:26:5-19 - incompleteMatch might raise Match_failure (Exn.res:27:2) and is not annotated with @raises(Match_failure) + Exn.res:32:5-13 + twoRaises might raise [A (Exn.res:34:4), B (Exn.res:37:4)] and is not annotated with @raises([A, B]) Exception Analysis - Exn.res:34:5-13 - twoRaises might raise [A (Exn.res:36:4), B (Exn.res:39:4)] and is not annotated with @raises([A, B]) + Exn.res:41:5-14 + sequencing might raise A (Exn.res:42:2) and is not annotated with @raises(A) Exception Analysis - Exn.res:43:5-14 - sequencing might raise A (Exn.res:44:2) and is not annotated with @raises(A) + Exn.res:48:5-14 + wrongCatch might raise B (Exn.res:49:6) and is not annotated with @raises(B) Exception Analysis - Exn.res:50:5-14 - wrongCatch might raise B (Exn.res:51:6) and is not annotated with @raises(B) + Exn.res:54:5-15 + wrongCatch2 might raise [C (Exn.res:55:24), Match_failure (Exn.res:55:2)] and is not annotated with @raises([C, Match_failure]) Exception Analysis - Exn.res:56:5-15 - wrongCatch2 might raise [C (Exn.res:57:24), Match_failure (Exn.res:57:2)] and is not annotated with @raises([C, Match_failure]) + Exn.res:62:5-19 + raise2Annotate3 might raise [A (Exn.res:64:4), B (Exn.res:67:4)] and is annotated with redundant @raises(C) Exception Analysis - Exn.res:64:5-19 - raise2Annotate3 might raise [A (Exn.res:66:4), B (Exn.res:69:4)] and is annotated with redundant @raises(C) + Exn.res:73:5-24 + parse_json_from_file might raise Error (Exn.res:76:4) and is not annotated with @raises(Error) Exception Analysis - Exn.res:75:5-24 - parse_json_from_file might raise Error (Exn.res:78:4) and is not annotated with @raises(Error) + Exn.res:82:5-11 + reRaise might raise B (Exn.res:84:19) and is not annotated with @raises(B) Exception Analysis - Exn.res:84:5-11 - reRaise might raise B (Exn.res:86:19) and is not annotated with @raises(B) + Exn.res:93:5-22 + raiseInInternalLet might raise A (Exn.res:94:14) and is not annotated with @raises(A) Exception Analysis - Exn.res:95:5-22 - raiseInInternalLet might raise A (Exn.res:96:14) and is not annotated with @raises(A) + Exn.res:98:5-16 + indirectCall might raise Not_found (Exn.res:98:31) and is not annotated with @raises(Not_found) Exception Analysis - Exn.res:100:5-16 - indirectCall might raise Not_found (Exn.res:100:31) and is not annotated with @raises(Not_found) + Exn.res:124:5-16 + severalCases might raise Failure (Exn.res:126:13 Exn.res:127:13 Exn.res:128:15) and is not annotated with @raises(Failure) Exception Analysis - Exn.res:148:5-16 - severalCases might raise Failure (Exn.res:150:13 Exn.res:151:13 Exn.res:152:15) and is not annotated with @raises(Failure) - - Exception Analysis - Exn.res:159:32-56 - String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:161:32-63 - String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:163:47-71 - String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:163:47-79 - expression does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:169:51-55 - expression does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:167:25-56 - String.uncapitalize_ascii does not raise and is annotated with redundant @doesNotRaise - - Exception Analysis - Exn.res:176:5-23 + Exn.res:136:5-23 redundantAnnotation raises nothing and is annotated with redundant @raises(Invalid_argument) Exception Analysis - Exn.res:178:5-6 - _x might raise A (Exn.res:178:9) and is not annotated with @raises(A) - - Exception Analysis - Exn.res:180:5 - _ might raise A (Exn.res:180:8) and is not annotated with @raises(A) + Exn.res:138:5-6 + _x might raise A (Exn.res:138:9) and is not annotated with @raises(A) Exception Analysis - Exn.res:182:5-6 - () might raise A (Exn.res:182:9) and is not annotated with @raises(A) + Exn.res:140:5 + _ might raise A (Exn.res:140:8) and is not annotated with @raises(A) Exception Analysis - Exn.res:184:1-16 - Toplevel expression might raise Not_found (Exn.res:184:0) and is not annotated with @raises(Not_found) + Exn.res:142:5-6 + () might raise A (Exn.res:142:9) and is not annotated with @raises(A) Exception Analysis - Exn.res:186:1-19 - Toplevel expression might raise exit (Exn.res:186:7) and is not annotated with @raises(exit) + Exn.res:144:1-16 + Toplevel expression might raise Not_found (Exn.res:144:0) and is not annotated with @raises(Not_found) Exception Analysis - Exn.res:196:45-46 + Exn.res:154:45-46 expression does not raise and is annotated with redundant @doesNotRaise Exception Analysis - Exn.res:196:5-21 - onResultPipeWrong might raise Assert_failure (Exn.res:196:48) and is not annotated with @raises(Assert_failure) + Exn.res:154:5-21 + onResultPipeWrong might raise Assert_failure (Exn.res:154:48) and is not annotated with @raises(Assert_failure) Exception Analysis ExnA.res:1:5-7 bar might raise Not_found (ExnA.res:1:16) and is not annotated with @raises(Not_found) - Analysis reported 31 issues (Exception Analysis:31) + Analysis reported 23 issues (Exception Analysis:23) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json b/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json index 35f6c29214..39f26fe3ed 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/package-lock.json @@ -1,23 +1,21 @@ { "name": "deadcode", "version": "0.1.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "deadcode", "version": "0.1.0", "dependencies": { - "@glennsl/bs-json": "^5.0.4", - "@rescript/react": "^0.10.3" + "@rescript/react": "^0.13.0" }, "devDependencies": { - "react": "^16.13.1", - "react-dom": "^16.8.6", "rescript": "file:../../../.." } }, "../../../..": { + "name": "rescript", "version": "12.0.0-alpha.6", "dev": true, "hasInstallScript": true, @@ -38,29 +36,26 @@ "node": ">=18" } }, - "node_modules/@glennsl/bs-json": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@glennsl/bs-json/-/bs-json-5.0.4.tgz", - "integrity": "sha512-Th9DetZjRlMZrb74kgGJ44oWcoFyOTE884WlSuXft0Cd+J09vHRxiB7eVyK7Gthb4cSevsBBJDHYAbGGL25wPw==" - }, "node_modules/@rescript/react": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.10.3.tgz", - "integrity": "sha512-Lf9rzrR3bQPKJjOK3PBRa/B3xrJ7CqQ1HYr9VHPVxJidarIJJFZBhj0Dg1uZURX+Wg/xiP0PHFxXmdj2bK8Vxw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.13.0.tgz", + "integrity": "sha512-YSIWIyMlyF9ZaP6Q3hScl1h3wRbdIP4+Cb7PlDt7Y1PG8M8VWYhLoIgLb78mbBHcwFbZu0d5zAt1LSX5ilOiWQ==", "peerDependencies": { - "react": ">=16.8.1", - "react-dom": ">=16.8.1" + "react": ">=18.0.0", + "react-dom": ">=18.0.0" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true }, "node_modules/loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -68,151 +63,42 @@ "loose-envify": "cli.js" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dependencies": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "peer": true, "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "peer": true, "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^16.14.0" + "react": "^18.3.1" } }, - "node_modules/react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, "node_modules/rescript": { "resolved": "../../../..", "link": true }, "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "peer": true, "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - } - }, - "dependencies": { - "@glennsl/bs-json": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@glennsl/bs-json/-/bs-json-5.0.4.tgz", - "integrity": "sha512-Th9DetZjRlMZrb74kgGJ44oWcoFyOTE884WlSuXft0Cd+J09vHRxiB7eVyK7Gthb4cSevsBBJDHYAbGGL25wPw==" - }, - "@rescript/react": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.10.3.tgz", - "integrity": "sha512-Lf9rzrR3bQPKJjOK3PBRa/B3xrJ7CqQ1HYr9VHPVxJidarIJJFZBhj0Dg1uZURX+Wg/xiP0PHFxXmdj2bK8Vxw==", - "requires": {} - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" - }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - } - }, - "react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" - } - }, - "react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" - } - }, - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" - }, - "rescript": { - "version": "file:../../../..", - "requires": { - "@biomejs/biome": "1.8.3", - "mocha": "10.1.0", - "nyc": "15.0.0" - } - }, - "scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } } } diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/package.json b/tests/analysis_tests/tests-reanalyze/deadcode/package.json index dff7874dfd..cb9c926210 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/package.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/package.json @@ -3,12 +3,9 @@ "version": "0.1.0", "private": true, "devDependencies": { - "react": "^16.13.1", - "react-dom": "^16.8.6", "rescript": "file:../../../.." }, "dependencies": { - "@glennsl/bs-json": "^5.0.4", - "@rescript/react": "^0.10.3" + "@rescript/react": "^0.13.0" } } diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/bsconfig.json b/tests/analysis_tests/tests-reanalyze/deadcode/rescript.json similarity index 65% rename from tests/analysis_tests/tests-reanalyze/deadcode/bsconfig.json rename to tests/analysis_tests/tests-reanalyze/deadcode/rescript.json index a0e2baae9a..de71974292 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/bsconfig.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/rescript.json @@ -6,9 +6,8 @@ "transitive": true }, "name": "sample-typescript-app", - "bsc-flags": ["-bs-super-errors -w a"], - "jsx": { "version": 3 }, - "bs-dependencies": ["@rescript/react", "@glennsl/bs-json"], + "jsx": { "version": 4 }, + "bs-dependencies": ["@rescript/react"], "sources": [ { "dir": "src", @@ -16,7 +15,7 @@ } ], "package-specs": { - "module": "es6", + "module": "esmodule", "in-source": true }, "suffix": ".bs.js" diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler1.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler1.res index 291e3e19bb..6b3690c528 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler1.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/CreateErrorHandler1.res @@ -5,5 +5,5 @@ module Error1 = { module MyErrorHandler = ErrorHandler.Make(Error1) -MyErrorHandler.notify("abc") +MyErrorHandler.notify("abc")->ignore diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/DeadTest.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/DeadTest.res index 901d5af049..61b320568b 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/DeadTest.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/DeadTest.res @@ -95,33 +95,10 @@ and bar = () => foo() let withDefaultValue = (~paramWithDefault=3, y) => paramWithDefault + y -external unsafe_string1: (bytes, int, int) => Digest.t = "caml_md5_string" - -module Ext_buffer: { - external unsafe_string2: (bytes, int, int) => Digest.t = "caml_md5_string" -} = { - external unsafe_string2: (bytes, int, int) => Digest.t = "caml_md5_string" -} - let () = Js.log(DeadRT.Root("xzz")) module type LocalDynamicallyLoadedComponent2 = module type of DynamicallyLoadedComponent -module LazyDynamicallyLoadedComponent2 = { - let reasonResource: JSResource.t< - module(LocalDynamicallyLoadedComponent2), - > = JSResource.jSResource("DynamicallyLoadedComponent.bs") - let makeProps = DynamicallyLoadedComponent.makeProps - let make = props => - React.createElement( - { - module Comp = unpack(BootloaderResource.read(reasonResource)) - Comp.make - }, - props, - ) -} - module Chat = {} let zzz = { @@ -132,8 +109,7 @@ let zzz = { let () = Js.log() -let second = 1L -let minute = Int64.mul(60L, second) +let second = 1 let deadRef = ref(12) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/FC.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/FC.res deleted file mode 100644 index c582dc1fe5..0000000000 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/FC.res +++ /dev/null @@ -1,12 +0,0 @@ -module type ReplacebleComponent = { - @react.component - let make: unit => React.element -} - -let foo = (~impl: module(ReplacebleComponent)) => { - let module(X) = impl - X.make -} - -Js.log(foo) - diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/Hooks.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/Hooks.res index f35c242879..1887558035 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/Hooks.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/Hooks.res @@ -7,7 +7,7 @@ let make = (~vehicle) => {

{React.string( - "Hooks example " ++ (vehicle.name ++ (" clicked " ++ (string_of_int(count) ++ " times"))), + "Hooks example " ++ (vehicle.name ++ (" clicked " ++ (Int.toString(count) ++ " times"))), )}

@@ -24,26 +24,13 @@ let make = (~vehicle) => { @genType let default = make -@genType @react.component -let anotherComponent = (~vehicle, ~callback: unit => unit) => { - callback() -
{React.string("Another Hook " ++ vehicle.name)}
-} - module Inner = { @genType @react.component let make = (~vehicle) =>
{React.string("Another Hook " ++ vehicle.name)}
- @genType @react.component - let anotherComponent = (~vehicle) =>
{React.string("Another Hook " ++ vehicle.name)}
- module Inner2 = { @genType @react.component let make = (~vehicle) =>
{React.string("Another Hook " ++ vehicle.name)}
- - @genType @react.component - let anotherComponent = (~vehicle) => -
{React.string("Another Hook " ++ vehicle.name)}
} } @@ -60,33 +47,8 @@ let functionWithRenamedArgs = (~_to, ~_Type, ~cb: cb) => { _to.name ++ _Type.name } -@genType @react.component -let componentWithRenamedArgs = (~_to, ~_Type, ~cb: cb) => { - cb(~_to) - React.string(_to.name ++ _Type.name) -} - -@genType @react.component -let makeWithRef = (~vehicle) => { - let _ = 34 - ref => - switch ref->Js.Nullable.toOption { - | Some(ref) => - | None => React.null - } -} - -@genType -let testForwardRef = React.forwardRef(makeWithRef) - type r = {x: string} -@genType @react.component -let input = React.forwardRef((~r, (), ref) =>
{React.string(r.x)}
) - -@genType -type callback<'input, 'output> = React.callback<'input, 'output> - @genType type testReactContext = React.Context.t @@ -96,12 +58,6 @@ type testReactRef = React.Ref.t @genType type testDomRef = ReactDOM.domRef -@genType @react.component -let polymorphicComponent = (~p as (x, _)) => React.string(x.name) - -@genType @react.component -let functionReturningReactElement = (~name) => React.string(name) - module RenderPropRequiresConversion = { @genType @react.component let make = (~renderVehicle: {"vehicle": vehicle, "number": int} => React.element) => { @@ -109,7 +65,3 @@ module RenderPropRequiresConversion = { renderVehicle({"vehicle": car, "number": 42}) } } - -@genType @react.component -let aComponentWithChildren = (~vehicle, ~children) => -
{React.string("Another Hook " ++ vehicle.name)}
children
diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportHookDefault.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportHookDefault.res index 1b49ea2c7e..7b7252efca 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportHookDefault.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportHookDefault.res @@ -9,11 +9,3 @@ external make: ( ~children: React.element, ~renderMe: ImportHooks.renderMe, ) => React.element = "make" - -@genType.import("./hookExample") @react.component -external make2: ( - ~person: person, - ~children: React.element, - ~renderMe: ImportHooks.renderMe, -) => React.element = "default" - diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportIndex.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportIndex.res index c4d5ce3294..25217fe854 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportIndex.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/ImportIndex.res @@ -1,4 +1,4 @@ // TODO: rename metodd back once remmt bug is fixed @genType.import("./") @react.component -external make: (~method: @string [#push | #replace]=?) => React.element = "default" +external make: (~method: [#push | #replace]=?) => React.element = "default" diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/TestPromise.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/TestPromise.res index 0bd3ddd60a..174cb4964f 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/TestPromise.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/TestPromise.res @@ -11,5 +11,5 @@ type fromPayload = { type toPayload = {result: string} @genType -let convert = Js.Promise.then_(({s}) => Js.Promise.resolve({result: s})) +let convert = Js.Promise.then_(({s}) => Js.Promise.resolve({result: s}), ...) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/Types.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/Types.res index 3ce309c105..ed7de796eb 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/Types.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/Types.res @@ -56,9 +56,6 @@ type opaqueVariant = | A | B -@genType -let stringT: String.t = "a" - @genType let jsStringT: Js.String.t = "a" @@ -147,13 +144,13 @@ type date = Js.Date.t let currentTime = Js.Date.make() @genType -type i64A = Int64.t +type i64A = int @genType -type i64B = int64 +type i64B = int @genType -let i64Const: i64B = 34L +let i64Const: i64B = 34 @genType let optFunction = Some(() => 3) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/Unison.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/Unison.res index a2e5698e65..b56f30c871 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/Unison.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/Unison.res @@ -34,7 +34,7 @@ let rec toString = (~width, stack) => | Empty => "" } -toString(~width=80, Empty) -toString(~width=80, Cons(group(~break=Never, "abc"), Empty)) -toString(~width=80, Cons(group(~break=Always, "d"), Empty)) +toString(~width=80, Empty)->ignore +toString(~width=80, Cons(group(~break=Never, "abc"), Empty))->ignore +toString(~width=80, Cons(group(~break=Always, "d"), Empty))->ignore diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/BsJson.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/BsJson.res index ad892c8e7b..e69de29bb2 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/BsJson.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/BsJson.res @@ -1,5 +0,0 @@ -@raise(DecodeError) -let testBsJson = x => Json_decode.string(x) - -@raise(DecodeError) -let testBsJson2 = x => Json.Decode.string(x) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/Exn.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/Exn.res index 0ccfe96c69..2e08e11146 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/Exn.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/Exn.res @@ -21,8 +21,6 @@ let callsRaiseWithAnnotation = raisesWithAnnotaion() @raises(A) let callsRaiseWithAnnotationAndIsAnnotated = raisesWithAnnotaion() -let z = List.hd(list{}) - let incompleteMatch = l => switch l { | list{} => () @@ -111,16 +109,6 @@ let tryChar = v => { 42 } -module StringHash = Hashtbl.Make({ - include String - let hash = Hashtbl.hash -}) - -let specializedHash = tbl => StringHash.find(tbl, "abc") - -@raises(Not_found) -let genericHash = tbl => Hashtbl.find(tbl, "abc") - @raises(Not_found) let raiseAtAt = () => \"@@"(raise, Not_found) @@ -133,18 +121,6 @@ let raiseArrow = Not_found->raise @raises(Js.Exn.Error) let bar = () => Js.Json.parseExn("!!!") -let foo = () => - try Js.Json.parseExn("!!!") catch { - | Js.Exn.Error(_) => Js.Json.null - } - -@raises(Invalid_argument) -let stringMake1 = String.make(12, ' ') - -let stringMake2 = (@doesNotRaise String.make)(12, ' ') - -let stringMake3 = @doesNotRaise String.make(12, ' ') - let severalCases = cases => switch cases { | "one" => failwith("one") @@ -156,22 +132,6 @@ let severalCases = cases => @raises(genericException) let genericRaiseIsNotSupported = exn => raise(exn) -let redundant = (@doesNotRaise String.uncapitalize_ascii)("abc") - -let redundant2 = @doesNotRaise String.uncapitalize_ascii("abc") - -let redundant3 = @doesNotRaise (@doesNotRaise String.uncapitalize_ascii)("abc") - -let redundant4 = () => { - let _ = String.uncapitalize_ascii("abc") - let _ = @doesNotRaise String.uncapitalize_ascii("abc") - let _ = String.uncapitalize_ascii("abc") - let _ = String.uncapitalize_ascii(@doesNotRaise "abc") -} - -@raises(exit) -let exits = () => exit(1) - @raises(Invalid_argument) let redundantAnnotation = () => () @@ -183,8 +143,6 @@ let () = raise(A) raise(Not_found) -true ? exits() : () - // Examples with pipe let onFunction = () => (@doesNotRaise Belt.Array.getExn)([], 0) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/InnerModules.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/InnerModules.res index 7c7f9dc1a0..e69de29bb2 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/InnerModules.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/InnerModules.res @@ -1,27 +0,0 @@ -@raises(exit) -let wrapExitTop = x => exit(x) - -module M1 = { - @raises(exit) - let wrapExitM1 = x => exit(x) - - @raises(exit) - let callLocally = x => wrapExitM1(x) - - @raises(exit) - let callTop = x => wrapExitTop(x) - - module M2 = { - @raises(exit) - let wrapExitM2 = x => exit(x) - - @raises(exit) - let callM1 = x => wrapExitM1(x) - - @raises(exit) - let callTop = x => wrapExitTop(x) - } -} - -@raises(exit) -let callM1 = x => M1.wrapExitM1(x) diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/TestInnerModules.res b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/TestInnerModules.res index 6b1e88516b..e69de29bb2 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/TestInnerModules.res +++ b/tests/analysis_tests/tests-reanalyze/deadcode/src/exception/TestInnerModules.res @@ -1,8 +0,0 @@ -@raises(exit) -let testTop = x => InnerModules.wrapExitTop(x) - -@raises(exit) -let testM1 = x => InnerModules.M1.wrapExitM1(x) - -@raises(exit) -let testM2 = x => InnerModules.M1.M2.wrapExitM2(x) diff --git a/tests/analysis_tests/tests-reanalyze/termination/bsconfig.json b/tests/analysis_tests/tests-reanalyze/termination/bsconfig.json index ebd0a3a8ec..5791d79093 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/bsconfig.json +++ b/tests/analysis_tests/tests-reanalyze/termination/bsconfig.json @@ -5,8 +5,6 @@ "unsuppress": [] }, "name": "arnold", - "bsc-flags": ["-bs-super-errors"], - "jsx": { "version": 3 }, "bs-dependencies": [], "sources": [ { @@ -15,7 +13,7 @@ } ], "package-specs": { - "module": "es6", + "module": "esmodule", "in-source": true }, "suffix": ".bs.js" diff --git a/tests/analysis_tests/tests-reanalyze/termination/expected/termination.txt b/tests/analysis_tests/tests-reanalyze/termination/expected/termination.txt index 063f51b6dd..63e15f8134 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/expected/termination.txt +++ b/tests/analysis_tests/tests-reanalyze/termination/expected/termination.txt @@ -70,16 +70,15 @@ Termination Analysis for butSecondArgumentIsAlwaysEvaluated Function Table - 1 parseExpression: [_ || _]; [+Parser.next; parseExpression; parseExpression; _ || parseInt] - 2 parseInt: [_ || _]; +Parser.next; _ - 3 parseList: parseList$loop - 4 parseList$loop: [_ || f; parseList$loop; _] - 5 parseListExpression: parseList - 6 parseListExpression2: parseExpression; parseList - 7 parseListInt: parseList - 8 parseListIntTailRecursive: parseListIntTailRecursive$loop - 9 parseListIntTailRecursive$loop: [_ || parseInt; parseListIntTailRecursive$loop] - 10 parseListListInt: parseList + 1 parseExpression: [_ || _]; [+Parser.next; parseExpression; parseExpression; _ || _] + 2 parseList: parseList$loop + 3 parseList$loop: [_ || f; parseList$loop; _] + 4 parseListExpression: _ + 5 parseListExpression2: parseExpression; parseList + 6 parseListInt: _ + 7 parseListIntTailRecursive: parseListIntTailRecursive$loop + 8 parseListIntTailRecursive$loop: [_ || parseListIntTailRecursive$loop] + 9 parseListListInt: parseList Termination Analysis for parseListInt @@ -112,13 +111,10 @@ Function Table 1 alwaysReturnNone: [+Parser.next; alwaysReturnNone || None] - 2 parseIntO: [+Parser.next; Some || None] - 3 parseIntOWrapper: parseIntO - 4 parseListIntO: parseListO - 5 parseListO: parseListO$loop - 6 parseListO$loop: [+Parser.next; _ || switch f {some: parseListO$loop, none: _}] - 7 testAlwaysReturnNone: alwaysReturnNone - 8 thisMakesNoProgress: None; [_ || +Parser.next; Some] + 2 parseIntOWrapper: _ + 3 parseListIntO: _ + 4 testAlwaysReturnNone: alwaysReturnNone + 5 thisMakesNoProgress: None; [_ || +Parser.next; Some] Termination Analysis for parseListIntO @@ -153,10 +149,10 @@ Termination Analysis Stats Files:1 Recursive Blocks:21 - Functions:49 - Infinite Loops:10 - Hygiene Errors:1 - Cache Hits:8/31 + Functions:45 + Infinite Loops:12 + Hygiene Errors:3 + Cache Hits:4/21 Error Termination @@ -207,6 +203,14 @@ CallStack: 1 evalOrderIsNotRightToLeft (TestCyberTruck.res 102) + Error Hygiene + TestCyberTruck.res:217:32-73 + Call must have named argument f + + Error Hygiene + TestCyberTruck.res:198:29-53 + Named argument f must be passed a recursive function + Error Termination TestCyberTruck.res:180:15-21 Possible infinite loop when calling parseList$loop which is parseList$loop @@ -215,6 +219,21 @@ 2 parseList (TestCyberTruck.res 201) 1 parseListListInt (TestCyberTruck.res 201) + Error Termination + TestCyberTruck.res:180:15-21 + Possible infinite loop when calling parseList$loop which is parseList$loop + CallStack: + 3 parseList$loop (TestCyberTruck.res 183) + 2 parseList (TestCyberTruck.res 220) + 1 parseListExpression2 (TestCyberTruck.res 220) + + Error Termination + TestCyberTruck.res:228:7-38 + Possible infinite loop when calling parseListIntTailRecursive$loop + CallStack: + 2 parseListIntTailRecursive$loop (TestCyberTruck.res 230) + 1 parseListIntTailRecursive (TestCyberTruck.res 223) + Error Termination TestCyberTruck.res:238:31-49 Possible infinite loop when calling loopAfterProgress @@ -227,4 +246,4 @@ CallStack: 1 countRendersCompiled (TestCyberTruck.res 283) - Analysis reported 11 issues (Error Hygiene:1, Error Termination:10) + Analysis reported 15 issues (Error Hygiene:3, Error Termination:12) diff --git a/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res b/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res index 5c5fcbf835..0ec2e9b863 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res +++ b/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res @@ -2,7 +2,7 @@ // A progress function will eventually terminate let progress = { - let counter = ref(Random.int(100)) + let counter = ref((100)) () => { if counter.contents < 0 { assert false @@ -151,8 +151,8 @@ module Parser = { } let next = p => { - p.token = Random.bool() ? Eof : Int(Random.int(1000)) - p.position = {lnum: Random.int(1000), cnum: Random.int(80)} + p.token = true ? Eof : Int((1000)) + p.position = {lnum: (1000), cnum: (80)} } let err = (p, s) => p.errors = list{s, ...p.errors} @@ -214,16 +214,16 @@ and parseExpression = (~x=4, p: Parser.t) => } @progress -and parseListExpression = p => parseList(p, ~f=parseExpression) +and parseListExpression = p => parseList(p, ~f=(x => parseExpression(x))) @progress -and parseListExpression2 = p => parseList(p, ~f=parseExpression(~x=7)) +and parseListExpression2 = p => parseList(p, ~f=parseExpression(~x=7, ...)) @progress and parseListIntTailRecursive = p => { let rec loop = (p: Parser.t, l) => if p.token == Asterisk { - List.rev(l) + l } else { loop(p, list{parseInt(p), ...l}) } @@ -297,7 +297,7 @@ module ParserWihtOptionals = { list{} } else { switch f(p) { - | None => List.rev(nodes) + | None => nodes | Some(item) => loop(list{item, ...nodes}) } } diff --git a/tests/analysis_tests/tests/package-lock.json b/tests/analysis_tests/tests/package-lock.json index cdb575c401..fc1d7e517e 100644 --- a/tests/analysis_tests/tests/package-lock.json +++ b/tests/analysis_tests/tests/package-lock.json @@ -34,13 +34,14 @@ }, "../../..": { "name": "rescript", - "version": "12.0.0-alpha.5", + "version": "12.0.0-alpha.6", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { "bsc": "cli/bsc", "bstracing": "lib/bstracing", "rescript": "cli/rescript", + "rescript-tools": "cli/rescript-tools", "rewatch": "cli/rewatch" }, "devDependencies": { From eb4da83f05aee97acf264b594651a02ee05c627c Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 2 Dec 2024 16:07:18 +0100 Subject: [PATCH 3/4] Update package-lock.json --- tests/tools_tests/package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tools_tests/package-lock.json b/tests/tools_tests/package-lock.json index b0670b1847..b9b60740d9 100644 --- a/tests/tools_tests/package-lock.json +++ b/tests/tools_tests/package-lock.json @@ -15,7 +15,7 @@ }, "../..": { "name": "rescript", - "version": "12.0.0-alpha.5", + "version": "12.0.0-alpha.6", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { From e3890154bf341b41f42e41d66158ed9c2e02f865 Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Mon, 2 Dec 2024 19:17:55 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3285ca8c0..980bc24bd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ #### :bug: Bug fix - Fix bug where a ref assignment is moved ouside a conditional. https://github.com/rescript-lang/rescript/pull/7176 +#### :house: Internal +- Use latest compiler for tests. https://github.com/rescript-lang/rescript/pull/7186 + # 12.0.0-alpha.5 #### :rocket: New Feature