From c7231fe202b2dcacca6933e445d7f839230b290f Mon Sep 17 00:00:00 2001 From: Dmitry Zakharov Date: Wed, 16 Aug 2023 13:19:11 +0400 Subject: [PATCH] Clean up -with-deps from the codebase --- jscomp/bsb/bsb_exception.ml | 3 +-- jscomp/build_tests/case/package.json | 2 +- jscomp/build_tests/case2/package.json | 2 +- jscomp/build_tests/case3/package.json | 2 +- jscomp/build_tests/custom_namespace/input.js | 2 +- jscomp/build_tests/custom_namespace/package.json | 2 +- jscomp/build_tests/cycle/package.json | 2 +- jscomp/build_tests/cycle1/input.js | 2 +- jscomp/build_tests/devdeps/package.json | 2 +- jscomp/build_tests/devonly/package.json | 2 +- .../build_tests/duplicated_symlinked_packages/a/package.json | 2 +- .../build_tests/duplicated_symlinked_packages/b/package.json | 2 +- .../build_tests/duplicated_symlinked_packages/c/package.json | 2 +- jscomp/build_tests/duplicated_symlinked_packages/input.js | 2 +- jscomp/build_tests/duplicated_symlinked_packages/package.json | 2 +- jscomp/build_tests/exports/package.json | 2 +- jscomp/build_tests/hyphen2/package.json | 2 +- jscomp/build_tests/install/package.json | 2 +- jscomp/build_tests/nested/package.json | 2 +- jscomp/build_tests/nnest/package.json | 2 +- jscomp/build_tests/ns/package.json | 2 +- jscomp/build_tests/post-build/package.json | 2 +- jscomp/build_tests/rerror/input.js | 2 +- jscomp/build_tests/rerror/package.json | 2 +- jscomp/build_tests/super_errors/expected/modules1.res.expected | 2 -- jscomp/build_tests/uncurried-always/input.js | 2 +- jscomp/build_tests/weird_names/package.json | 2 +- jscomp/build_tests/x-y/package.json | 2 +- jscomp/build_tests/zerocycle/package.json | 2 +- jscomp/gentype_tests/typescript-react-example/package.json | 2 +- jscomp/ml/typetexp.ml | 2 -- 31 files changed, 29 insertions(+), 34 deletions(-) diff --git a/jscomp/bsb/bsb_exception.ml b/jscomp/bsb/bsb_exception.ml index c6bd9fbdc29..ed3bc221345 100644 --- a/jscomp/bsb/bsb_exception.ml +++ b/jscomp/bsb/bsb_exception.ml @@ -66,8 +66,7 @@ let print (fmt : Format.formatter) (x : error) = Format.fprintf fmt "File \"bsconfig.json\", line 1\n\ @{Error:@} package @{%s@} not found or built %s\n\ - - Did you install it?\n\ - - If you did, did you run `rescript build -with-deps`?" name in_json + - Did you install it?" name in_json | Json_config (pos, s) -> Format.fprintf fmt "File %S, line %d:\n\ diff --git a/jscomp/build_tests/case/package.json b/jscomp/build_tests/case/package.json index 898b6615c60..619a22e9501 100644 --- a/jscomp/build_tests/case/package.json +++ b/jscomp/build_tests/case/package.json @@ -2,7 +2,7 @@ "name": "case", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/case2/package.json b/jscomp/build_tests/case2/package.json index 904aebe85d5..a082d7015be 100644 --- a/jscomp/build_tests/case2/package.json +++ b/jscomp/build_tests/case2/package.json @@ -2,7 +2,7 @@ "name": "case2", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/case3/package.json b/jscomp/build_tests/case3/package.json index 9e2e2870197..0c46a3dfded 100644 --- a/jscomp/build_tests/case3/package.json +++ b/jscomp/build_tests/case3/package.json @@ -2,7 +2,7 @@ "name": "case3", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/custom_namespace/input.js b/jscomp/build_tests/custom_namespace/input.js index a1201cbe5b4..f100581dbc4 100644 --- a/jscomp/build_tests/custom_namespace/input.js +++ b/jscomp/build_tests/custom_namespace/input.js @@ -4,7 +4,7 @@ var path = require("path"); var assert = require("assert"); var rescript_exe = require("../../../scripts/bin_path").rescript_exe; -child_process.execSync(`${rescript_exe} clean -with-deps && ${rescript_exe} build`, { +child_process.execSync(`${rescript_exe} clean && ${rescript_exe} build`, { cwd: __dirname, }); diff --git a/jscomp/build_tests/custom_namespace/package.json b/jscomp/build_tests/custom_namespace/package.json index 0afe9e776b0..ff3881a660c 100644 --- a/jscomp/build_tests/custom_namespace/package.json +++ b/jscomp/build_tests/custom_namespace/package.json @@ -2,7 +2,7 @@ "name": "namespace", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/cycle/package.json b/jscomp/build_tests/cycle/package.json index d05af4c5973..488bf6bcd25 100644 --- a/jscomp/build_tests/cycle/package.json +++ b/jscomp/build_tests/cycle/package.json @@ -2,7 +2,7 @@ "name": "cycle", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/cycle1/input.js b/jscomp/build_tests/cycle1/input.js index 9c9b0a8dbc3..c8453f94b61 100644 --- a/jscomp/build_tests/cycle1/input.js +++ b/jscomp/build_tests/cycle1/input.js @@ -5,7 +5,7 @@ const fs = require('fs') const path = require('path') var rescript_exe = require("../../../scripts/bin_path").rescript_exe -cp.execSync(`${rescript_exe} clean -with-deps`, { cwd: __dirname, }); +cp.execSync(`${rescript_exe} clean`, { cwd: __dirname, }); var output = cp.spawnSync(rescript_exe, { encoding: "utf8", shell: true }); diff --git a/jscomp/build_tests/devdeps/package.json b/jscomp/build_tests/devdeps/package.json index a64f246beba..7c4250ad691 100644 --- a/jscomp/build_tests/devdeps/package.json +++ b/jscomp/build_tests/devdeps/package.json @@ -2,7 +2,7 @@ "name": "devdeps", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/devonly/package.json b/jscomp/build_tests/devonly/package.json index 0cb91838dc5..18aeaf4fa27 100644 --- a/jscomp/build_tests/devonly/package.json +++ b/jscomp/build_tests/devonly/package.json @@ -2,7 +2,7 @@ "name": "devonly", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/duplicated_symlinked_packages/a/package.json b/jscomp/build_tests/duplicated_symlinked_packages/a/package.json index 204c7c3f1bf..3bfbac807f8 100644 --- a/jscomp/build_tests/duplicated_symlinked_packages/a/package.json +++ b/jscomp/build_tests/duplicated_symlinked_packages/a/package.json @@ -4,7 +4,7 @@ "scripts": { "build": "rescript build", "start": "rescript build -w", - "clean": "rescript clean -with-deps" + "clean": "rescript clean" }, "keywords": [ "BuckleScript" diff --git a/jscomp/build_tests/duplicated_symlinked_packages/b/package.json b/jscomp/build_tests/duplicated_symlinked_packages/b/package.json index c7de682d62f..21032b3ede4 100644 --- a/jscomp/build_tests/duplicated_symlinked_packages/b/package.json +++ b/jscomp/build_tests/duplicated_symlinked_packages/b/package.json @@ -4,7 +4,7 @@ "scripts": { "build": "rescript build", "start": "rescript build -w", - "clean": "rescript clean -with-deps" + "clean": "rescript clean" }, "keywords": [ "BuckleScript" diff --git a/jscomp/build_tests/duplicated_symlinked_packages/c/package.json b/jscomp/build_tests/duplicated_symlinked_packages/c/package.json index 7dd155cf21a..0eb39d1031b 100644 --- a/jscomp/build_tests/duplicated_symlinked_packages/c/package.json +++ b/jscomp/build_tests/duplicated_symlinked_packages/c/package.json @@ -4,7 +4,7 @@ "scripts": { "build": "rescript build", "start": "rescript build -w", - "clean": "rescript clean -with-deps" + "clean": "rescript clean" }, "keywords": [ "BuckleScript" diff --git a/jscomp/build_tests/duplicated_symlinked_packages/input.js b/jscomp/build_tests/duplicated_symlinked_packages/input.js index ad80c4849f9..66c2e0e9e4f 100644 --- a/jscomp/build_tests/duplicated_symlinked_packages/input.js +++ b/jscomp/build_tests/duplicated_symlinked_packages/input.js @@ -12,7 +12,7 @@ function postProcessErrorOutput (output) { output = output.replace(new RegExp(__dirname, 'gi'), '.') return output } -child_process.execSync(`${rescript_exe} clean -with-deps`,{cwd:__dirname}) +child_process.execSync(`${rescript_exe} clean`,{cwd:__dirname}) child_process.exec(rescript_exe, {cwd: __dirname}, (err, stdout, stderr) => { const actualErrorOutput = postProcessErrorOutput(stderr.toString()) if (updateTests) { diff --git a/jscomp/build_tests/duplicated_symlinked_packages/package.json b/jscomp/build_tests/duplicated_symlinked_packages/package.json index 081c040d743..365f79e5ccf 100644 --- a/jscomp/build_tests/duplicated_symlinked_packages/package.json +++ b/jscomp/build_tests/duplicated_symlinked_packages/package.json @@ -2,7 +2,7 @@ "name": "duplicated-symlinked-packages", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/exports/package.json b/jscomp/build_tests/exports/package.json index cd635a29738..8ee100cf4dd 100644 --- a/jscomp/build_tests/exports/package.json +++ b/jscomp/build_tests/exports/package.json @@ -2,7 +2,7 @@ "name": "exports", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/hyphen2/package.json b/jscomp/build_tests/hyphen2/package.json index 5ccd3a73926..28ed7a112ef 100644 --- a/jscomp/build_tests/hyphen2/package.json +++ b/jscomp/build_tests/hyphen2/package.json @@ -2,7 +2,7 @@ "name": "hyphen2", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/install/package.json b/jscomp/build_tests/install/package.json index cc2f43b3216..7ed8983cb44 100644 --- a/jscomp/build_tests/install/package.json +++ b/jscomp/build_tests/install/package.json @@ -2,7 +2,7 @@ "name": "install", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "install": "rescript build -install", "watch": "rescript build -w" diff --git a/jscomp/build_tests/nested/package.json b/jscomp/build_tests/nested/package.json index ca296ee78c3..9aa6fb85982 100644 --- a/jscomp/build_tests/nested/package.json +++ b/jscomp/build_tests/nested/package.json @@ -2,7 +2,7 @@ "name": "nested", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/nnest/package.json b/jscomp/build_tests/nnest/package.json index ca296ee78c3..9aa6fb85982 100644 --- a/jscomp/build_tests/nnest/package.json +++ b/jscomp/build_tests/nnest/package.json @@ -2,7 +2,7 @@ "name": "nested", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/ns/package.json b/jscomp/build_tests/ns/package.json index b1bb64129ee..b3a92351f46 100644 --- a/jscomp/build_tests/ns/package.json +++ b/jscomp/build_tests/ns/package.json @@ -2,7 +2,7 @@ "name": "ns", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/post-build/package.json b/jscomp/build_tests/post-build/package.json index 40ef7c6a299..2ad2b88c93e 100644 --- a/jscomp/build_tests/post-build/package.json +++ b/jscomp/build_tests/post-build/package.json @@ -2,7 +2,7 @@ "name": "post-build", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/rerror/input.js b/jscomp/build_tests/rerror/input.js index 426b544d231..77fb6044ba5 100644 --- a/jscomp/build_tests/rerror/input.js +++ b/jscomp/build_tests/rerror/input.js @@ -1,7 +1,7 @@ var child_process = require("child_process"); var assert = require("assert"); var rescript_exe = require("../../../scripts/bin_path").rescript_exe; -child_process.spawnSync(`${rescript_exe} clean -with-deps`, { +child_process.spawnSync(`${rescript_exe} clean`, { cwd: __dirname, encoding: "utf8", }); diff --git a/jscomp/build_tests/rerror/package.json b/jscomp/build_tests/rerror/package.json index f2a1c06e89f..36908590fb6 100644 --- a/jscomp/build_tests/rerror/package.json +++ b/jscomp/build_tests/rerror/package.json @@ -2,7 +2,7 @@ "name": "rerror", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/super_errors/expected/modules1.res.expected b/jscomp/build_tests/super_errors/expected/modules1.res.expected index 1ea2fe29e5e..e818260bec1 100644 --- a/jscomp/build_tests/super_errors/expected/modules1.res.expected +++ b/jscomp/build_tests/super_errors/expected/modules1.res.expected @@ -8,6 +8,4 @@ The module or file Foo can't be found. - If it's a third-party dependency: - Did you list it in bsconfig.json? - - Did you run `rescript build` instead of `rescript build -with-deps` - (latter builds third-parties)? - Did you include the file's directory in bsconfig.json? \ No newline at end of file diff --git a/jscomp/build_tests/uncurried-always/input.js b/jscomp/build_tests/uncurried-always/input.js index 086ace11157..3d512d1e613 100644 --- a/jscomp/build_tests/uncurried-always/input.js +++ b/jscomp/build_tests/uncurried-always/input.js @@ -5,5 +5,5 @@ const fs = require('fs') const path = require('path') var rescript_exe = require("../../../scripts/bin_path").rescript_exe -cp.execSync(`${rescript_exe} clean -with-deps`, { cwd: __dirname, }); +cp.execSync(`${rescript_exe} clean`, { cwd: __dirname, }); cp.execSync(`${rescript_exe}`, { cwd: __dirname, }); diff --git a/jscomp/build_tests/weird_names/package.json b/jscomp/build_tests/weird_names/package.json index 3ad2923e995..4759556a0ca 100644 --- a/jscomp/build_tests/weird_names/package.json +++ b/jscomp/build_tests/weird_names/package.json @@ -2,7 +2,7 @@ "name": "weird_names", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/x-y/package.json b/jscomp/build_tests/x-y/package.json index 19ab4473118..b614a749833 100644 --- a/jscomp/build_tests/x-y/package.json +++ b/jscomp/build_tests/x-y/package.json @@ -2,7 +2,7 @@ "name": "x-y", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript", "watch": "rescript build -w" }, diff --git a/jscomp/build_tests/zerocycle/package.json b/jscomp/build_tests/zerocycle/package.json index e44e7f662d8..03290447934 100644 --- a/jscomp/build_tests/zerocycle/package.json +++ b/jscomp/build_tests/zerocycle/package.json @@ -2,7 +2,7 @@ "name": "zerocycle", "version": "0.1.0", "scripts": { - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "build": "rescript build", "watch": "rescript build -w" }, diff --git a/jscomp/gentype_tests/typescript-react-example/package.json b/jscomp/gentype_tests/typescript-react-example/package.json index b8a0cec5b85..8ff3dda051a 100644 --- a/jscomp/gentype_tests/typescript-react-example/package.json +++ b/jscomp/gentype_tests/typescript-react-example/package.json @@ -10,7 +10,7 @@ "scripts": { "start": "rescript build -w", "build": "rescript", - "clean": "rescript clean -with-deps", + "clean": "rescript clean", "tsc": "tsc -p tsconfig.json" }, "devDependencies": { diff --git a/jscomp/ml/typetexp.ml b/jscomp/ml/typetexp.ml index 7825b4eef5a..24614dc3981 100644 --- a/jscomp/ml/typetexp.ml +++ b/jscomp/ml/typetexp.ml @@ -994,8 +994,6 @@ let report_error env ppf = function @{The module or file %a can't be found.@}@,\ @[- If it's a third-party dependency:@,\ - Did you list it in bsconfig.json?@,\ - - @[Did you run `rescript build` instead of `rescript build -with-deps`@ (latter builds third-parties)@]?\ - @]@,\ - Did you include the file's directory in bsconfig.json?@]\ @]" Printtyp.longident lid