Skip to content

Commit

Permalink
Clean up -with-deps from the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
DZakh committed Aug 16, 2023
1 parent d4e9ca1 commit c7231fe
Show file tree
Hide file tree
Showing 31 changed files with 29 additions and 34 deletions.
3 changes: 1 addition & 2 deletions jscomp/bsb/bsb_exception.ml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ let print (fmt : Format.formatter) (x : error) =
Format.fprintf fmt
"File \"bsconfig.json\", line 1\n\
@{<error>Error:@} package @{<error>%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\
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/case/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/case2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/case3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/custom_namespace/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});

Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/custom_namespace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/cycle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/cycle1/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/devdeps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/devonly/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build": "rescript build",
"start": "rescript build -w",
"clean": "rescript clean -with-deps"
"clean": "rescript clean"
},
"keywords": [
"BuckleScript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build": "rescript build",
"start": "rescript build -w",
"clean": "rescript clean -with-deps"
"clean": "rescript clean"
},
"keywords": [
"BuckleScript"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"scripts": {
"build": "rescript build",
"start": "rescript build -w",
"clean": "rescript clean -with-deps"
"clean": "rescript clean"
},
"keywords": [
"BuckleScript"
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/duplicated_symlinked_packages/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/exports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/hyphen2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/install/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/nested/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/nnest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/ns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/post-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/rerror/input.js
Original file line number Diff line number Diff line change
@@ -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",
});
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/rerror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
2 changes: 1 addition & 1 deletion jscomp/build_tests/uncurried-always/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, });
2 changes: 1 addition & 1 deletion jscomp/build_tests/weird_names/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/x-y/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/build_tests/zerocycle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion jscomp/gentype_tests/typescript-react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 0 additions & 2 deletions jscomp/ml/typetexp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,6 @@ let report_error env ppf = function
@{<info>The module or file %a can't be found.@}@,\
@[<v 2>- 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
Expand Down

0 comments on commit c7231fe

Please sign in to comment.