From 729f803d699b4d867bda7c2b6ca4b7af306dd149 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 14:55:02 +0200 Subject: [PATCH 01/17] rescript_exe -> rescript_legacy_exe --- cli/common/bins.js | 2 +- cli/common/bsb.js | 4 ++-- cli/{rescript.js => rescript-legacy.js} | 14 +++++++------- cli/{rescript => rescript-legacy}/dump.js | 14 +++++++++----- cli/{rescript => rescript-legacy}/format.js | 6 +++--- lib_dev/process.js | 6 +++--- packages/@rescript/darwin-arm64/bin.d.ts | 14 +++++++------- packages/@rescript/darwin-arm64/bin.js | 2 +- packages/@rescript/darwin-x64/bin.d.ts | 14 +++++++------- packages/@rescript/darwin-x64/bin.js | 2 +- packages/@rescript/linux-arm64/bin.d.ts | 14 +++++++------- packages/@rescript/linux-arm64/bin.js | 2 +- packages/@rescript/linux-x64/bin.d.ts | 14 +++++++------- packages/@rescript/linux-x64/bin.js | 2 +- packages/@rescript/win32-x64/bin.d.ts | 14 +++++++------- packages/@rescript/win32-x64/bin.js | 2 +- 16 files changed, 65 insertions(+), 61 deletions(-) rename cli/{rescript.js => rescript-legacy.js} (90%) rename cli/{rescript => rescript-legacy}/dump.js (81%) rename cli/{rescript => rescript-legacy}/format.js (98%) diff --git a/cli/common/bins.js b/cli/common/bins.js index 91a699771e..368bd3a537 100644 --- a/cli/common/bins.js +++ b/cli/common/bins.js @@ -22,7 +22,7 @@ export const { ninja_exe, rescript_editor_analysis_exe, rescript_tools_exe, - rescript_exe, + rescript_legacy_exe, rewatch_exe, }, } = mod; diff --git a/cli/common/bsb.js b/cli/common/bsb.js index 8f229f1aa7..b38d462887 100644 --- a/cli/common/bsb.js +++ b/cli/common/bsb.js @@ -7,7 +7,7 @@ import * as os from "node:os"; import * as path from "node:path"; import { WebSocket } from "#lib/minisocket"; -import { rescript_exe } from "./bins.js"; +import { rescript_legacy_exe } from "./bins.js"; const cwd = process.cwd(); const lockFileName = path.join(cwd, ".bsb.lock"); @@ -50,7 +50,7 @@ function acquireBuild(args, options) { return null; } try { - ownerProcess = child_process.spawn(rescript_exe, args, { + ownerProcess = child_process.spawn(rescript_legacy_exe, args, { stdio: "inherit", ...options, }); diff --git a/cli/rescript.js b/cli/rescript-legacy.js similarity index 90% rename from cli/rescript.js rename to cli/rescript-legacy.js index 98d8900ab2..c464f468a6 100755 --- a/cli/rescript.js +++ b/cli/rescript-legacy.js @@ -6,10 +6,10 @@ // It matters since we need read .sourcedirs(location) // and its content are file/directories with regard to project root -import * as tty from "node:tty"; import * as fs from "node:fs"; +import * as tty from "node:tty"; -import { bsc_exe, rescript_exe } from "./common/bins.js"; +import { bsc_exe, rescript_legacy_exe } from "./common/bins.js"; import * as bsb from "./common/bsb.js"; const cwd = process.cwd(); @@ -94,7 +94,7 @@ if ( console.log(helpMessage); } else if (argPatterns.version.includes(args[0])) { const packageSpec = JSON.parse( - fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8") + fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8"), ); console.log(packageSpec.version); @@ -116,13 +116,13 @@ if ( break; } case "format": { - const mod = await import("./rescript/format.js"); - await mod.main(subcmdArgs, rescript_exe, bsc_exe); + const mod = await import("./rescript-legacy/format.js"); + await mod.main(subcmdArgs, rescript_legacy_exe, bsc_exe); break; } case "dump": { - const mod = await import("./rescript/dump.js"); - mod.main(subcmdArgs, rescript_exe, bsc_exe); + const mod = await import("./rescript-legacy/dump.js"); + mod.main(subcmdArgs, rescript_legacy_exe, bsc_exe); break; } default: { diff --git a/cli/rescript/dump.js b/cli/rescript-legacy/dump.js similarity index 81% rename from cli/rescript/dump.js rename to cli/rescript-legacy/dump.js index bd1201e354..3acf52a251 100644 --- a/cli/rescript/dump.js +++ b/cli/rescript-legacy/dump.js @@ -16,10 +16,10 @@ const specs = []; /** * @param {string[]} argv - * @param {string} rescript_exe + * @param {string} rescript_legacy_exe * @param {string} bsc_exe */ -export function main(argv, rescript_exe, bsc_exe) { +export function main(argv, rescript_legacy_exe, bsc_exe) { let target; arg.parse_exn(dump_usage, argv, specs, xs => { if (xs.length !== 1) { @@ -34,9 +34,13 @@ export function main(argv, rescript_exe, bsc_exe) { process.exit(2); } - let output = child_process.spawnSync(rescript_exe, ["build", "--", target], { - encoding: "utf-8", - }); + let output = child_process.spawnSync( + rescript_legacy_exe, + ["build", "--", target], + { + encoding: "utf-8", + }, + ); if (output.status !== 0) { console.log(output.stdout); console.error(output.stderr); diff --git a/cli/rescript/format.js b/cli/rescript-legacy/format.js similarity index 98% rename from cli/rescript/format.js rename to cli/rescript-legacy/format.js index 072d340d76..9fc1759b8d 100644 --- a/cli/rescript/format.js +++ b/cli/rescript-legacy/format.js @@ -143,10 +143,10 @@ async function formatFiles(files, bsc_exe, isSupportedFile, checkFormatting) { /** * @param {string[]} argv - * @param {string} rescript_exe + * @param {string} rescript_legacy_exe * @param {string} bsc_exe */ -export async function main(argv, rescript_exe, bsc_exe) { +export async function main(argv, rescript_legacy_exe, bsc_exe) { const isSupportedFile = hasExtension(formattedFileExtensions); const isSupportedStd = hasExtension(formattedStdExtensions); @@ -179,7 +179,7 @@ export async function main(argv, rescript_exe, bsc_exe) { // -all // TODO: check the rest arguments const output = child_process.spawnSync( - rescript_exe, + rescript_legacy_exe, ["info", "-list-files"], { encoding: "utf-8", diff --git a/lib_dev/process.js b/lib_dev/process.js index c2d506b08b..bcb73ba1b2 100644 --- a/lib_dev/process.js +++ b/lib_dev/process.js @@ -1,7 +1,7 @@ import * as child_process from "node:child_process"; import * as fs from "node:fs/promises"; import * as path from "node:path"; -import { bsc_exe, rescript_exe } from "#cli/bins"; +import { bsc_exe, rescript_legacy_exe } from "#cli/bins"; /** * @typedef {{ @@ -181,7 +181,7 @@ export function setup(cwd = process.cwd()) { * @return {Promise} */ execBuild(args = [], options = {}) { - return exec(rescript_exe, ["build", ...args], options); + return exec(rescript_legacy_exe, ["build", ...args], options); }, /** @@ -192,7 +192,7 @@ export function setup(cwd = process.cwd()) { * @return {Promise} */ execClean(args = [], options = {}) { - return exec(rescript_exe, ["clean", ...args], options); + return exec(rescript_legacy_exe, ["clean", ...args], options); }, /** diff --git a/packages/@rescript/darwin-arm64/bin.d.ts b/packages/@rescript/darwin-arm64/bin.d.ts index 1a78d275d7..8ee51bed78 100644 --- a/packages/@rescript/darwin-arm64/bin.d.ts +++ b/packages/@rescript/darwin-arm64/bin.d.ts @@ -3,11 +3,11 @@ export const binDir: string; export const binPaths: BinaryPaths; export type BinaryPaths = { - bsb_helper_exe: string, - bsc_exe: string, - ninja_exe: string, - rescript_exe: string, - rescript_tools_exe: string, - rescript_editor_analysis_exe: string, - rewatch_exe: string, + bsb_helper_exe: string; + bsc_exe: string; + ninja_exe: string; + rescript_legacy_exe: string; + rescript_tools_exe: string; + rescript_editor_analysis_exe: string; + rewatch_exe: string; }; diff --git a/packages/@rescript/darwin-arm64/bin.js b/packages/@rescript/darwin-arm64/bin.js index 0bae072013..41dd99e328 100644 --- a/packages/@rescript/darwin-arm64/bin.js +++ b/packages/@rescript/darwin-arm64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/darwin-x64/bin.d.ts b/packages/@rescript/darwin-x64/bin.d.ts index 1a78d275d7..8ee51bed78 100644 --- a/packages/@rescript/darwin-x64/bin.d.ts +++ b/packages/@rescript/darwin-x64/bin.d.ts @@ -3,11 +3,11 @@ export const binDir: string; export const binPaths: BinaryPaths; export type BinaryPaths = { - bsb_helper_exe: string, - bsc_exe: string, - ninja_exe: string, - rescript_exe: string, - rescript_tools_exe: string, - rescript_editor_analysis_exe: string, - rewatch_exe: string, + bsb_helper_exe: string; + bsc_exe: string; + ninja_exe: string; + rescript_legacy_exe: string; + rescript_tools_exe: string; + rescript_editor_analysis_exe: string; + rewatch_exe: string; }; diff --git a/packages/@rescript/darwin-x64/bin.js b/packages/@rescript/darwin-x64/bin.js index 0bae072013..41dd99e328 100644 --- a/packages/@rescript/darwin-x64/bin.js +++ b/packages/@rescript/darwin-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/linux-arm64/bin.d.ts b/packages/@rescript/linux-arm64/bin.d.ts index 1a78d275d7..8ee51bed78 100644 --- a/packages/@rescript/linux-arm64/bin.d.ts +++ b/packages/@rescript/linux-arm64/bin.d.ts @@ -3,11 +3,11 @@ export const binDir: string; export const binPaths: BinaryPaths; export type BinaryPaths = { - bsb_helper_exe: string, - bsc_exe: string, - ninja_exe: string, - rescript_exe: string, - rescript_tools_exe: string, - rescript_editor_analysis_exe: string, - rewatch_exe: string, + bsb_helper_exe: string; + bsc_exe: string; + ninja_exe: string; + rescript_legacy_exe: string; + rescript_tools_exe: string; + rescript_editor_analysis_exe: string; + rewatch_exe: string; }; diff --git a/packages/@rescript/linux-arm64/bin.js b/packages/@rescript/linux-arm64/bin.js index 0bae072013..41dd99e328 100644 --- a/packages/@rescript/linux-arm64/bin.js +++ b/packages/@rescript/linux-arm64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/linux-x64/bin.d.ts b/packages/@rescript/linux-x64/bin.d.ts index 1a78d275d7..8ee51bed78 100644 --- a/packages/@rescript/linux-x64/bin.d.ts +++ b/packages/@rescript/linux-x64/bin.d.ts @@ -3,11 +3,11 @@ export const binDir: string; export const binPaths: BinaryPaths; export type BinaryPaths = { - bsb_helper_exe: string, - bsc_exe: string, - ninja_exe: string, - rescript_exe: string, - rescript_tools_exe: string, - rescript_editor_analysis_exe: string, - rewatch_exe: string, + bsb_helper_exe: string; + bsc_exe: string; + ninja_exe: string; + rescript_legacy_exe: string; + rescript_tools_exe: string; + rescript_editor_analysis_exe: string; + rewatch_exe: string; }; diff --git a/packages/@rescript/linux-x64/bin.js b/packages/@rescript/linux-x64/bin.js index 0bae072013..41dd99e328 100644 --- a/packages/@rescript/linux-x64/bin.js +++ b/packages/@rescript/linux-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/win32-x64/bin.d.ts b/packages/@rescript/win32-x64/bin.d.ts index 1a78d275d7..8ee51bed78 100644 --- a/packages/@rescript/win32-x64/bin.d.ts +++ b/packages/@rescript/win32-x64/bin.d.ts @@ -3,11 +3,11 @@ export const binDir: string; export const binPaths: BinaryPaths; export type BinaryPaths = { - bsb_helper_exe: string, - bsc_exe: string, - ninja_exe: string, - rescript_exe: string, - rescript_tools_exe: string, - rescript_editor_analysis_exe: string, - rewatch_exe: string, + bsb_helper_exe: string; + bsc_exe: string; + ninja_exe: string; + rescript_legacy_exe: string; + rescript_tools_exe: string; + rescript_editor_analysis_exe: string; + rewatch_exe: string; }; diff --git a/packages/@rescript/win32-x64/bin.js b/packages/@rescript/win32-x64/bin.js index 0bae072013..41dd99e328 100644 --- a/packages/@rescript/win32-x64/bin.js +++ b/packages/@rescript/win32-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, From a6a8b6af416ad33c2fdde58bca2354045188d184 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:00:14 +0200 Subject: [PATCH 02/17] rescript.exe -> rescript-legacy.exe --- analysis/examples/larger-project/src/res_scanner.res | 2 +- compiler/bsb_exe/dune | 2 +- compiler/syntax/src/res_scanner.ml | 2 +- packages/@rescript/darwin-arm64/bin.js | 2 +- packages/@rescript/darwin-arm64/package.json | 2 +- packages/@rescript/darwin-x64/bin.js | 2 +- packages/@rescript/darwin-x64/package.json | 2 +- packages/@rescript/linux-arm64/bin.js | 2 +- packages/@rescript/linux-arm64/package.json | 2 +- packages/@rescript/linux-x64/bin.js | 2 +- packages/@rescript/linux-x64/package.json | 2 +- packages/@rescript/win32-x64/bin.js | 2 +- packages/@rescript/win32-x64/package.json | 2 +- rewatch/src/helpers.rs | 2 +- scripts/copyExes.js | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/analysis/examples/larger-project/src/res_scanner.res b/analysis/examples/larger-project/src/res_scanner.res index 6b3b8ce34b..b625fc4d5a 100644 --- a/analysis/examples/larger-project/src/res_scanner.res +++ b/analysis/examples/larger-project/src/res_scanner.res @@ -62,7 +62,7 @@ let position = scanner => { } /* Small debugging util -❯ echo 'let msg = "hello"' | ./lib/rescript.exe +❯ echo 'let msg = "hello"' | ./lib/rescript-legacy.exe let msg = "hello" ^-^ let 0-3 let msg = "hello" diff --git a/compiler/bsb_exe/dune b/compiler/bsb_exe/dune index 4478ba2cc4..0c22a4930c 100644 --- a/compiler/bsb_exe/dune +++ b/compiler/bsb_exe/dune @@ -5,7 +5,7 @@ (executable (name rescript_main) - (public_name rescript) + (public_name rescript-legacy) (package rescript) (enabled_if (<> %{profile} browser)) diff --git a/compiler/syntax/src/res_scanner.ml b/compiler/syntax/src/res_scanner.ml index a49ea8a5ee..3c66812bc1 100644 --- a/compiler/syntax/src/res_scanner.ml +++ b/compiler/syntax/src/res_scanner.ml @@ -61,7 +61,7 @@ let position scanner = } (* Small debugging util - ❯ echo 'let msg = "hello"' | ./lib/rescript.exe + ❯ echo 'let msg = "hello"' | ./lib/rescript-legacy.exe let msg = "hello" ^-^ let 0-3 let msg = "hello" diff --git a/packages/@rescript/darwin-arm64/bin.js b/packages/@rescript/darwin-arm64/bin.js index 41dd99e328..07be3b83e7 100644 --- a/packages/@rescript/darwin-arm64/bin.js +++ b/packages/@rescript/darwin-arm64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_legacy_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript-legacy.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/darwin-arm64/package.json b/packages/@rescript/darwin-arm64/package.json index 5015e16f9d..927432e13a 100644 --- a/packages/@rescript/darwin-arm64/package.json +++ b/packages/@rescript/darwin-arm64/package.json @@ -32,7 +32,7 @@ "./bin/bsb_helper.exe", "./bin/bsc.exe", "./bin/ninja.exe", - "./bin/rescript.exe", + "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", "./bin/rewatch.exe" diff --git a/packages/@rescript/darwin-x64/bin.js b/packages/@rescript/darwin-x64/bin.js index 41dd99e328..07be3b83e7 100644 --- a/packages/@rescript/darwin-x64/bin.js +++ b/packages/@rescript/darwin-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_legacy_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript-legacy.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/darwin-x64/package.json b/packages/@rescript/darwin-x64/package.json index 753167a9e5..2e2138b70e 100644 --- a/packages/@rescript/darwin-x64/package.json +++ b/packages/@rescript/darwin-x64/package.json @@ -32,7 +32,7 @@ "./bin/bsb_helper.exe", "./bin/bsc.exe", "./bin/ninja.exe", - "./bin/rescript.exe", + "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", "./bin/rewatch.exe" diff --git a/packages/@rescript/linux-arm64/bin.js b/packages/@rescript/linux-arm64/bin.js index 41dd99e328..07be3b83e7 100644 --- a/packages/@rescript/linux-arm64/bin.js +++ b/packages/@rescript/linux-arm64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_legacy_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript-legacy.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/linux-arm64/package.json b/packages/@rescript/linux-arm64/package.json index 4d2391b32f..501cf53c4e 100644 --- a/packages/@rescript/linux-arm64/package.json +++ b/packages/@rescript/linux-arm64/package.json @@ -32,7 +32,7 @@ "./bin/bsb_helper.exe", "./bin/bsc.exe", "./bin/ninja.exe", - "./bin/rescript.exe", + "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", "./bin/rewatch.exe" diff --git a/packages/@rescript/linux-x64/bin.js b/packages/@rescript/linux-x64/bin.js index 41dd99e328..07be3b83e7 100644 --- a/packages/@rescript/linux-x64/bin.js +++ b/packages/@rescript/linux-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_legacy_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript-legacy.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/linux-x64/package.json b/packages/@rescript/linux-x64/package.json index 58a531e342..0c1e073bd8 100644 --- a/packages/@rescript/linux-x64/package.json +++ b/packages/@rescript/linux-x64/package.json @@ -32,7 +32,7 @@ "./bin/bsb_helper.exe", "./bin/bsc.exe", "./bin/ninja.exe", - "./bin/rescript.exe", + "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", "./bin/rewatch.exe" diff --git a/packages/@rescript/win32-x64/bin.js b/packages/@rescript/win32-x64/bin.js index 41dd99e328..07be3b83e7 100644 --- a/packages/@rescript/win32-x64/bin.js +++ b/packages/@rescript/win32-x64/bin.js @@ -8,7 +8,7 @@ export const binPaths = { bsb_helper_exe: path.join(binDir, "bsb_helper.exe"), bsc_exe: path.join(binDir, "bsc.exe"), ninja_exe: path.join(binDir, "ninja.exe"), - rescript_legacy_exe: path.join(binDir, "rescript.exe"), + rescript_legacy_exe: path.join(binDir, "rescript-legacy.exe"), rescript_tools_exe: path.join(binDir, "rescript-tools.exe"), rescript_editor_analysis_exe: path.join( binDir, diff --git a/packages/@rescript/win32-x64/package.json b/packages/@rescript/win32-x64/package.json index 3a7e57a7a8..a299e55ba4 100644 --- a/packages/@rescript/win32-x64/package.json +++ b/packages/@rescript/win32-x64/package.json @@ -32,7 +32,7 @@ "./bin/bsb_helper.exe", "./bin/bsc.exe", "./bin/ninja.exe", - "./bin/rescript.exe", + "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", "./bin/rewatch.exe" diff --git a/rewatch/src/helpers.rs b/rewatch/src/helpers.rs index 9b6661c2e4..648c8905e4 100644 --- a/rewatch/src/helpers.rs +++ b/rewatch/src/helpers.rs @@ -240,7 +240,7 @@ pub fn get_rescript_legacy(root_path: &Path, workspace_root: Option) -> ) { (Ok(path), _) => path, (_, Some(Ok(path))) => path, - _ => panic!("Could not find rescript.exe"), + _ => panic!("Could not find rescript-legacy.exe"), } } diff --git a/scripts/copyExes.js b/scripts/copyExes.js index 3e54761753..6379862b01 100755 --- a/scripts/copyExes.js +++ b/scripts/copyExes.js @@ -34,7 +34,7 @@ const shouldCopyNinja = args.values.all || args.values.ninja; const shouldCopyRewatch = args.values.all || args.values.rewatch; if (shouldCopyCompiler) { - copyExe(compilerBinDir, "rescript"); + copyExe(compilerBinDir, "rescript-legacy"); copyExe(compilerBinDir, "rescript-editor-analysis"); copyExe(compilerBinDir, "rescript-tools"); copyExe(compilerBinDir, "bsc"); From b934f86c199930085551b13e39be49d5d22154e0 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:23:46 +0200 Subject: [PATCH 03/17] rewatch.exe -> rescript.exe --- Makefile | 1 - scripts/copyExes.js | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 032b80f314..8083399fb6 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,6 @@ dce: rewatch: cargo build --manifest-path rewatch/Cargo.toml --release - cp rewatch/target/release/rewatch rewatch ./scripts/copyExes.js --rewatch ninja/ninja: diff --git a/scripts/copyExes.js b/scripts/copyExes.js index 6379862b01..9020a3d5ab 100755 --- a/scripts/copyExes.js +++ b/scripts/copyExes.js @@ -46,17 +46,18 @@ if (shouldCopyNinja) { } if (shouldCopyRewatch) { - copyExe(rewatchDir, "rewatch"); + copyExe(path.join(rewatchDir, "target", "release"), "rewatch", "rescript"); } /** * @param {string} dir * @param {string} exe + * @param {string | undefined} renamed */ -function copyExe(dir, exe) { +function copyExe(dir, exe, renamed) { const ext = process.platform === "win32" ? ".exe" : ""; const src = path.join(dir, exe + ext); - const dest = path.join(binDir, `${exe}.exe`); + const dest = path.join(binDir, `${renamed ?? exe}.exe`); // For some reason, the copy operation fails in Windows CI if the file already exists. if (process.platform === "win32" && fs.existsSync(dest)) { From a8ebb3ea6529930275f069ca42d075726cc441f9 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:26:03 +0200 Subject: [PATCH 04/17] cli/rescript.js -> cli/rescript-legacy.js --- cli/{rewatch.js => rescript.js} | 0 lib_dev/process.js | 5 ++++- package.json | 2 +- packages/artifacts.txt | 2 +- rewatch/src/helpers.rs | 4 ++-- scripts/buildRuntime.sh | 2 +- scripts/format.sh | 2 +- scripts/format_check.sh | 2 +- yarn.lock | 2 +- 9 files changed, 12 insertions(+), 9 deletions(-) rename cli/{rewatch.js => rescript.js} (100%) diff --git a/cli/rewatch.js b/cli/rescript.js similarity index 100% rename from cli/rewatch.js rename to cli/rescript.js diff --git a/lib_dev/process.js b/lib_dev/process.js index bcb73ba1b2..0dbddd4881 100644 --- a/lib_dev/process.js +++ b/lib_dev/process.js @@ -158,7 +158,10 @@ export function setup(cwd = process.cwd()) { * @return {Promise} */ rescript(command, args = [], options = {}) { - const cliPath = path.join(import.meta.dirname, "../cli/rescript.js"); + const cliPath = path.join( + import.meta.dirname, + "../cli/rescript-legacy.js", + ); return exec("node", [cliPath, command, ...args].filter(Boolean), options); }, diff --git a/package.json b/package.json index aca5a88df1..d57b6bda2e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "bin": { "bsc": "cli/bsc.js", "bstracing": "cli/bstracing.js", - "rescript": "cli/rescript.js", + "rescript-legacy": "cli/rescript-legacy.js", "rescript-tools": "cli/rescript-tools.js", "rewatch": "cli/rewatch.js" }, diff --git a/packages/artifacts.txt b/packages/artifacts.txt index d963e87546..f110403ae2 100644 --- a/packages/artifacts.txt +++ b/packages/artifacts.txt @@ -10,7 +10,7 @@ cli/common/args.js cli/common/bins.js cli/common/bsb.js cli/rescript-tools.js -cli/rescript.js +cli/rescript-legacy.js cli/rescript/dump.js cli/rescript/format.js cli/rewatch.js diff --git a/rewatch/src/helpers.rs b/rewatch/src/helpers.rs index 648c8905e4..b808909af3 100644 --- a/rewatch/src/helpers.rs +++ b/rewatch/src/helpers.rs @@ -227,13 +227,13 @@ pub fn get_rescript_legacy(root_path: &Path, workspace_root: Option) -> match ( root_path .join(&bin_dir) - .join("rescript.js") + .join("rescript-legacy.js") .canonicalize() .map(StrippedVerbatimPath::to_stripped_verbatim_path), workspace_root.map(|workspace_root| { workspace_root .join(&bin_dir) - .join("rescript.js") + .join("rescript-legacy.js") .canonicalize() .map(StrippedVerbatimPath::to_stripped_verbatim_path) }), diff --git a/scripts/buildRuntime.sh b/scripts/buildRuntime.sh index 42ace88baf..1d3c6a541f 100755 --- a/scripts/buildRuntime.sh +++ b/scripts/buildRuntime.sh @@ -2,7 +2,7 @@ set -e shopt -s extglob -(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build) +(cd runtime && ../cli/rescript-legacy.js clean && ../cli/rescript-legacy.js build) rm -f lib/es6/*.js lib/js/*.js lib/ocaml/* mkdir -p lib/es6 lib/js lib/ocaml diff --git a/scripts/format.sh b/scripts/format.sh index a1bbd91607..d8d743a7e4 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -5,6 +5,6 @@ shopt -s extglob dune build @fmt --auto-promote files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_tests*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") -./cli/rescript.js format $files +./cli/rescript-legacy.js format $files yarn format diff --git a/scripts/format_check.sh b/scripts/format_check.sh index b7daf67d4f..68ac076216 100755 --- a/scripts/format_check.sh +++ b/scripts/format_check.sh @@ -18,7 +18,7 @@ case "$(uname -s)" in echo "Checking ReScript code formatting..." files=$(find runtime tests -type f \( -name "*.res" -o -name "*.resi" \) ! -name "syntaxErrors*" ! -name "generated_mocha_test.res" ! -path "tests/syntax_tests*" ! -path "tests/analysis_tests/tests*" ! -path "*/node_modules/*") - if ./cli/rescript.js format -check $files; then + if ./cli/rescript-legacy.js format -check $files; then printf "${successGreen}✅ ReScript code formatting ok.${reset}\n" else printf "${warningYellow}⚠️ ReScript code formatting issues found. Run 'make format' to fix.${reset}\n" diff --git a/yarn.lock b/yarn.lock index 13a6d70b5f..3ab27e7990 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2534,7 +2534,7 @@ __metadata: bin: bsc: cli/bsc.js bstracing: cli/bstracing.js - rescript: cli/rescript.js + rescript-legacy: cli/rescript-legacy.js rescript-tools: cli/rescript-tools.js rewatch: cli/rewatch.js languageName: unknown From 66314d976a9bfee4c52f9f942da3cb033536025c Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:30:17 +0200 Subject: [PATCH 05/17] cli/rewatch.js -> cli/rescript.js --- cli/rescript.js | 6 +++--- package.json | 4 ++-- packages/artifacts.txt | 8 ++++---- scripts/buildRuntimeRewatch.sh | 2 +- yarn.lock | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cli/rescript.js b/cli/rescript.js index d7e65e077e..b230c81247 100755 --- a/cli/rescript.js +++ b/cli/rescript.js @@ -3,11 +3,11 @@ // @ts-check import * as child_process from "node:child_process"; -import { rewatch_exe, bsc_exe } from "./common/bins.js"; +import { bsc_exe, rewatch_exe } from "./common/bins.js"; const args = process.argv.slice(2); -const firstPositionalArgIndex = args.findIndex((arg) => !arg.startsWith("-")); +const firstPositionalArgIndex = args.findIndex(arg => !arg.startsWith("-")); try { if (firstPositionalArgIndex !== -1) { @@ -25,7 +25,7 @@ try { [...subcommandWithArgs, "--bsc-path", bsc_exe], { stdio: "inherit", - } + }, ); } else { child_process.execFileSync(rewatch_exe, [...args], { diff --git a/package.json b/package.json index d57b6bda2e..b82b02f895 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,9 @@ "bin": { "bsc": "cli/bsc.js", "bstracing": "cli/bstracing.js", + "rescript": "cli/rescript.js", "rescript-legacy": "cli/rescript-legacy.js", - "rescript-tools": "cli/rescript-tools.js", - "rewatch": "cli/rewatch.js" + "rescript-tools": "cli/rescript-tools.js" }, "scripts": { "test": "node scripts/test.js -all", diff --git a/packages/artifacts.txt b/packages/artifacts.txt index f110403ae2..b302331583 100644 --- a/packages/artifacts.txt +++ b/packages/artifacts.txt @@ -9,11 +9,11 @@ cli/bstracing.js cli/common/args.js cli/common/bins.js cli/common/bsb.js -cli/rescript-tools.js cli/rescript-legacy.js -cli/rescript/dump.js -cli/rescript/format.js -cli/rewatch.js +cli/rescript-legacy/dump.js +cli/rescript-legacy/format.js +cli/rescript-tools.js +cli/rescript.js docs/docson/build-schema.json lib/es6/Belt.js lib/es6/Belt_Array.js diff --git a/scripts/buildRuntimeRewatch.sh b/scripts/buildRuntimeRewatch.sh index 2d2bd014af..e23f14f402 100755 --- a/scripts/buildRuntimeRewatch.sh +++ b/scripts/buildRuntimeRewatch.sh @@ -2,7 +2,7 @@ set -e shopt -s extglob -(cd runtime && ../cli/rewatch.js clean && ../cli/rewatch.js build) +(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build) rm -f lib/es6/*.js lib/js/*.js lib/ocaml/* mkdir -p lib/es6 lib/js lib/ocaml diff --git a/yarn.lock b/yarn.lock index 3ab27e7990..7252b6809e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2534,9 +2534,9 @@ __metadata: bin: bsc: cli/bsc.js bstracing: cli/bstracing.js + rescript: cli/rescript.js rescript-legacy: cli/rescript-legacy.js rescript-tools: cli/rescript-tools.js - rewatch: cli/rewatch.js languageName: unknown linkType: soft From dd93817d2bfb5068ca0df320f1f4109dbb212456 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:39:21 +0200 Subject: [PATCH 06/17] rewatch_exe -> rescript_exe --- cli/common/bins.js | 2 +- cli/rescript.js | 8 ++++---- packages/@rescript/darwin-arm64/bin.d.ts | 2 +- packages/@rescript/darwin-arm64/bin.js | 2 +- packages/@rescript/darwin-x64/bin.d.ts | 2 +- packages/@rescript/darwin-x64/bin.js | 2 +- packages/@rescript/linux-arm64/bin.d.ts | 2 +- packages/@rescript/linux-arm64/bin.js | 2 +- packages/@rescript/linux-x64/bin.d.ts | 2 +- packages/@rescript/linux-x64/bin.js | 2 +- packages/@rescript/win32-x64/bin.d.ts | 2 +- packages/@rescript/win32-x64/bin.js | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cli/common/bins.js b/cli/common/bins.js index 368bd3a537..1844607281 100644 --- a/cli/common/bins.js +++ b/cli/common/bins.js @@ -23,6 +23,6 @@ export const { rescript_editor_analysis_exe, rescript_tools_exe, rescript_legacy_exe, - rewatch_exe, + rescript_exe, }, } = mod; diff --git a/cli/rescript.js b/cli/rescript.js index b230c81247..731b33143a 100755 --- a/cli/rescript.js +++ b/cli/rescript.js @@ -3,7 +3,7 @@ // @ts-check import * as child_process from "node:child_process"; -import { bsc_exe, rewatch_exe } from "./common/bins.js"; +import { bsc_exe, rescript_exe } from "./common/bins.js"; const args = process.argv.slice(2); @@ -21,20 +21,20 @@ try { subcommand === "compiler-args" ) { child_process.execFileSync( - rewatch_exe, + rescript_exe, [...subcommandWithArgs, "--bsc-path", bsc_exe], { stdio: "inherit", }, ); } else { - child_process.execFileSync(rewatch_exe, [...args], { + child_process.execFileSync(rescript_exe, [...args], { stdio: "inherit", }); } } else { // no subcommand means build subcommand - child_process.execFileSync(rewatch_exe, [...args, "--bsc-path", bsc_exe], { + child_process.execFileSync(rescript_exe, [...args, "--bsc-path", bsc_exe], { stdio: "inherit", }); } diff --git a/packages/@rescript/darwin-arm64/bin.d.ts b/packages/@rescript/darwin-arm64/bin.d.ts index 8ee51bed78..e64a217712 100644 --- a/packages/@rescript/darwin-arm64/bin.d.ts +++ b/packages/@rescript/darwin-arm64/bin.d.ts @@ -9,5 +9,5 @@ export type BinaryPaths = { rescript_legacy_exe: string; rescript_tools_exe: string; rescript_editor_analysis_exe: string; - rewatch_exe: string; + rescript_exe: string; }; diff --git a/packages/@rescript/darwin-arm64/bin.js b/packages/@rescript/darwin-arm64/bin.js index 07be3b83e7..86975c991d 100644 --- a/packages/@rescript/darwin-arm64/bin.js +++ b/packages/@rescript/darwin-arm64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rewatch_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rewatch.exe"), }; diff --git a/packages/@rescript/darwin-x64/bin.d.ts b/packages/@rescript/darwin-x64/bin.d.ts index 8ee51bed78..e64a217712 100644 --- a/packages/@rescript/darwin-x64/bin.d.ts +++ b/packages/@rescript/darwin-x64/bin.d.ts @@ -9,5 +9,5 @@ export type BinaryPaths = { rescript_legacy_exe: string; rescript_tools_exe: string; rescript_editor_analysis_exe: string; - rewatch_exe: string; + rescript_exe: string; }; diff --git a/packages/@rescript/darwin-x64/bin.js b/packages/@rescript/darwin-x64/bin.js index 07be3b83e7..86975c991d 100644 --- a/packages/@rescript/darwin-x64/bin.js +++ b/packages/@rescript/darwin-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rewatch_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rewatch.exe"), }; diff --git a/packages/@rescript/linux-arm64/bin.d.ts b/packages/@rescript/linux-arm64/bin.d.ts index 8ee51bed78..e64a217712 100644 --- a/packages/@rescript/linux-arm64/bin.d.ts +++ b/packages/@rescript/linux-arm64/bin.d.ts @@ -9,5 +9,5 @@ export type BinaryPaths = { rescript_legacy_exe: string; rescript_tools_exe: string; rescript_editor_analysis_exe: string; - rewatch_exe: string; + rescript_exe: string; }; diff --git a/packages/@rescript/linux-arm64/bin.js b/packages/@rescript/linux-arm64/bin.js index 07be3b83e7..86975c991d 100644 --- a/packages/@rescript/linux-arm64/bin.js +++ b/packages/@rescript/linux-arm64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rewatch_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rewatch.exe"), }; diff --git a/packages/@rescript/linux-x64/bin.d.ts b/packages/@rescript/linux-x64/bin.d.ts index 8ee51bed78..e64a217712 100644 --- a/packages/@rescript/linux-x64/bin.d.ts +++ b/packages/@rescript/linux-x64/bin.d.ts @@ -9,5 +9,5 @@ export type BinaryPaths = { rescript_legacy_exe: string; rescript_tools_exe: string; rescript_editor_analysis_exe: string; - rewatch_exe: string; + rescript_exe: string; }; diff --git a/packages/@rescript/linux-x64/bin.js b/packages/@rescript/linux-x64/bin.js index 07be3b83e7..86975c991d 100644 --- a/packages/@rescript/linux-x64/bin.js +++ b/packages/@rescript/linux-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rewatch_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rewatch.exe"), }; diff --git a/packages/@rescript/win32-x64/bin.d.ts b/packages/@rescript/win32-x64/bin.d.ts index 8ee51bed78..e64a217712 100644 --- a/packages/@rescript/win32-x64/bin.d.ts +++ b/packages/@rescript/win32-x64/bin.d.ts @@ -9,5 +9,5 @@ export type BinaryPaths = { rescript_legacy_exe: string; rescript_tools_exe: string; rescript_editor_analysis_exe: string; - rewatch_exe: string; + rescript_exe: string; }; diff --git a/packages/@rescript/win32-x64/bin.js b/packages/@rescript/win32-x64/bin.js index 07be3b83e7..86975c991d 100644 --- a/packages/@rescript/win32-x64/bin.js +++ b/packages/@rescript/win32-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rewatch_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rewatch.exe"), }; From 7d77fb5b85b93784a665a9ec44a6e5bbca8054d0 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:40:01 +0200 Subject: [PATCH 07/17] rewatch.exe -> rescript.exe --- packages/@rescript/darwin-arm64/bin.js | 2 +- packages/@rescript/darwin-arm64/package.json | 2 +- packages/@rescript/darwin-x64/bin.js | 2 +- packages/@rescript/darwin-x64/package.json | 2 +- packages/@rescript/linux-arm64/bin.js | 2 +- packages/@rescript/linux-arm64/package.json | 2 +- packages/@rescript/linux-x64/bin.js | 2 +- packages/@rescript/linux-x64/package.json | 2 +- packages/@rescript/win32-x64/bin.js | 2 +- packages/@rescript/win32-x64/package.json | 2 +- rewatch/postinstall.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/@rescript/darwin-arm64/bin.js b/packages/@rescript/darwin-arm64/bin.js index 86975c991d..7b6f5bed04 100644 --- a/packages/@rescript/darwin-arm64/bin.js +++ b/packages/@rescript/darwin-arm64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rescript_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rescript.exe"), }; diff --git a/packages/@rescript/darwin-arm64/package.json b/packages/@rescript/darwin-arm64/package.json index 927432e13a..9cf7e758da 100644 --- a/packages/@rescript/darwin-arm64/package.json +++ b/packages/@rescript/darwin-arm64/package.json @@ -35,7 +35,7 @@ "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", - "./bin/rewatch.exe" + "./bin/rescript.exe" ] }, "engines": { diff --git a/packages/@rescript/darwin-x64/bin.js b/packages/@rescript/darwin-x64/bin.js index 86975c991d..7b6f5bed04 100644 --- a/packages/@rescript/darwin-x64/bin.js +++ b/packages/@rescript/darwin-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rescript_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rescript.exe"), }; diff --git a/packages/@rescript/darwin-x64/package.json b/packages/@rescript/darwin-x64/package.json index 2e2138b70e..6a4e7e408f 100644 --- a/packages/@rescript/darwin-x64/package.json +++ b/packages/@rescript/darwin-x64/package.json @@ -35,7 +35,7 @@ "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", - "./bin/rewatch.exe" + "./bin/rescript.exe" ] }, "engines": { diff --git a/packages/@rescript/linux-arm64/bin.js b/packages/@rescript/linux-arm64/bin.js index 86975c991d..7b6f5bed04 100644 --- a/packages/@rescript/linux-arm64/bin.js +++ b/packages/@rescript/linux-arm64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rescript_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rescript.exe"), }; diff --git a/packages/@rescript/linux-arm64/package.json b/packages/@rescript/linux-arm64/package.json index 501cf53c4e..682093c125 100644 --- a/packages/@rescript/linux-arm64/package.json +++ b/packages/@rescript/linux-arm64/package.json @@ -35,7 +35,7 @@ "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", - "./bin/rewatch.exe" + "./bin/rescript.exe" ] }, "engines": { diff --git a/packages/@rescript/linux-x64/bin.js b/packages/@rescript/linux-x64/bin.js index 86975c991d..7b6f5bed04 100644 --- a/packages/@rescript/linux-x64/bin.js +++ b/packages/@rescript/linux-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rescript_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rescript.exe"), }; diff --git a/packages/@rescript/linux-x64/package.json b/packages/@rescript/linux-x64/package.json index 0c1e073bd8..3b5223c31f 100644 --- a/packages/@rescript/linux-x64/package.json +++ b/packages/@rescript/linux-x64/package.json @@ -35,7 +35,7 @@ "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", - "./bin/rewatch.exe" + "./bin/rescript.exe" ] }, "engines": { diff --git a/packages/@rescript/win32-x64/bin.js b/packages/@rescript/win32-x64/bin.js index 86975c991d..7b6f5bed04 100644 --- a/packages/@rescript/win32-x64/bin.js +++ b/packages/@rescript/win32-x64/bin.js @@ -14,5 +14,5 @@ export const binPaths = { binDir, "rescript-editor-analysis.exe", ), - rescript_exe: path.join(binDir, "rewatch.exe"), + rescript_exe: path.join(binDir, "rescript.exe"), }; diff --git a/packages/@rescript/win32-x64/package.json b/packages/@rescript/win32-x64/package.json index a299e55ba4..c6846881cb 100644 --- a/packages/@rescript/win32-x64/package.json +++ b/packages/@rescript/win32-x64/package.json @@ -35,7 +35,7 @@ "./bin/rescript-legacy.exe", "./bin/rescript-editor-analysis.exe", "./bin/rescript-tools.exe", - "./bin/rewatch.exe" + "./bin/rescript.exe" ] }, "engines": { diff --git a/rewatch/postinstall.js b/rewatch/postinstall.js index 5b15cd4da3..e4bca5d607 100644 --- a/rewatch/postinstall.js +++ b/rewatch/postinstall.js @@ -20,7 +20,7 @@ const installMacLinuxBinary = (binary) => { const installWindowsBinary = () => { const source = path.join(__dirname, "rewatch-windows.exe"); if (fs.existsSync(source)) { - const target = path.join(__dirname, "rewatch.exe"); + const target = path.join(__dirname, "rescript.exe"); fs.renameSync(source, target); // windows scripts use a different file extension to executables From f048f5acad9d23e9cb0662e46920a0e510813fc6 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:40:42 +0200 Subject: [PATCH 08/17] Remove rewatch/postinstall.js --- rewatch/postinstall.js | 55 ------------------------------------------ 1 file changed, 55 deletions(-) delete mode 100644 rewatch/postinstall.js diff --git a/rewatch/postinstall.js b/rewatch/postinstall.js deleted file mode 100644 index e4bca5d607..0000000000 --- a/rewatch/postinstall.js +++ /dev/null @@ -1,55 +0,0 @@ -const path = require("path"); -const fs = require("fs"); - -const installMacLinuxBinary = (binary) => { - const source = path.join(__dirname, binary); - if (fs.existsSync(source)) { - // mac and linux support extension-less executables - // so just overwrite the shell script - const target = path.join(__dirname, "rewatch"); - fs.renameSync(source, target); - - // The binary should be executable in the bundle, but just in case - fs.chmodSync(target, 0777); - } else { - // assume we're in dev mode - nothing will break if the script - // isn't overwritten, it will just be slower - } -}; - -const installWindowsBinary = () => { - const source = path.join(__dirname, "rewatch-windows.exe"); - if (fs.existsSync(source)) { - const target = path.join(__dirname, "rescript.exe"); - fs.renameSync(source, target); - - // windows scripts use a different file extension to executables - // so we delete the script to make sure windows uses the exe now - const windowsScript = path.join(__dirname, "rewatch.cmd"); - fs.unlinkSync(windowsScript); - } else { - // assume we're in dev mode - nothing will break if the script - // isn't overwritten, it will just be slower - } -}; - -switch (process.platform) { - case "linux": - if (process.arch === "arm64") { - installMacLinuxBinary("rewatch-linux-arm64"); - } else { - installMacLinuxBinary("rewatch-linux"); - } - break; - case "darwin": - installMacLinuxBinary("rewatch-macos"); - break; - case "win32": - installWindowsBinary(); - break; - default: - // This won't break the installation because the shell script remains - // but that script will throw an error in this case anyway - console.warn(`No release available for "${process.platform}"`); - process.exit(1); -} From 4adf7a7360bdef5504d4acb87a4ff7f3d0d2c03a Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 3 Jul 2025 15:42:41 +0200 Subject: [PATCH 09/17] Rename runtime build scripts --- .github/workflows/ci.yml | 6 +++--- Makefile | 4 ++-- scripts/buildRuntime.sh | 5 ++++- scripts/{buildRuntimeRewatch.sh => buildRuntimeLegacy.sh} | 5 +---- 4 files changed, 10 insertions(+), 10 deletions(-) rename scripts/{buildRuntimeRewatch.sh => buildRuntimeLegacy.sh} (51%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6df388f946..3108fb2d16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -332,12 +332,12 @@ jobs: - name: Build runtime/stdlib with rewatch if: ${{ runner.os != 'Windows' }} - run: ./scripts/buildRuntimeRewatch.sh + run: ./scripts/buildRuntime.sh shell: bash - name: Build runtime/stdlib with bsb (Windows) if: ${{ runner.os == 'Windows' }} - run: ./scripts/buildRuntime.sh + run: ./scripts/buildRuntimeLegacy.sh shell: bash - name: Check for changes in lib folder @@ -510,7 +510,7 @@ jobs: - name: Build website if: steps.diffcheck.outputs.clean == 'false' run: | - npm ci + npm ci npm run build - name: Commit and push diff --git a/Makefile b/Makefile index 8083399fb6..7bd8b5f95d 100644 --- a/Makefile +++ b/Makefile @@ -52,10 +52,10 @@ reanalyze: reanalyze.exe -set-exit-code -all-cmt _build/default/compiler _build/default/tests -exclude-paths compiler/outcome_printer,compiler/ml,compiler/frontend,compiler/ext,compiler/depends,compiler/core,compiler/common,compiler/cmij,compiler/bsb_helper,compiler/bsb lib-bsb: - ./scripts/buildRuntime.sh + ./scripts/buildRuntimeLegacy.sh lib: - ./scripts/buildRuntimeRewatch.sh + ./scripts/buildRuntime.sh artifacts: lib ./scripts/npmPack.js --updateArtifactList diff --git a/scripts/buildRuntime.sh b/scripts/buildRuntime.sh index 1d3c6a541f..e23f14f402 100755 --- a/scripts/buildRuntime.sh +++ b/scripts/buildRuntime.sh @@ -2,7 +2,7 @@ set -e shopt -s extglob -(cd runtime && ../cli/rescript-legacy.js clean && ../cli/rescript-legacy.js build) +(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build) rm -f lib/es6/*.js lib/js/*.js lib/ocaml/* mkdir -p lib/es6 lib/js lib/ocaml @@ -11,3 +11,6 @@ cp runtime/lib/es6/*.js lib/es6 cp runtime/lib/js/*.js lib/js cp runtime/lib/bs/*.@(cmi|cmj|cmt|cmti) lib/ocaml/ cp runtime/*.@(res|resi) lib/ocaml/ +# overwrite the stdlib build artifacts to the testrepo +mkdir -p rewatch/testrepo/node_modules/rescript/lib/ocaml +cp -rf lib/ocaml rewatch/testrepo/node_modules/rescript/lib/ocaml \ No newline at end of file diff --git a/scripts/buildRuntimeRewatch.sh b/scripts/buildRuntimeLegacy.sh similarity index 51% rename from scripts/buildRuntimeRewatch.sh rename to scripts/buildRuntimeLegacy.sh index e23f14f402..1d3c6a541f 100755 --- a/scripts/buildRuntimeRewatch.sh +++ b/scripts/buildRuntimeLegacy.sh @@ -2,7 +2,7 @@ set -e shopt -s extglob -(cd runtime && ../cli/rescript.js clean && ../cli/rescript.js build) +(cd runtime && ../cli/rescript-legacy.js clean && ../cli/rescript-legacy.js build) rm -f lib/es6/*.js lib/js/*.js lib/ocaml/* mkdir -p lib/es6 lib/js lib/ocaml @@ -11,6 +11,3 @@ cp runtime/lib/es6/*.js lib/es6 cp runtime/lib/js/*.js lib/js cp runtime/lib/bs/*.@(cmi|cmj|cmt|cmti) lib/ocaml/ cp runtime/*.@(res|resi) lib/ocaml/ -# overwrite the stdlib build artifacts to the testrepo -mkdir -p rewatch/testrepo/node_modules/rescript/lib/ocaml -cp -rf lib/ocaml rewatch/testrepo/node_modules/rescript/lib/ocaml \ No newline at end of file From 6089fa1d3342c030e65fa079fc15078aeb67f008 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 11:20:14 +0200 Subject: [PATCH 10/17] Fix gentype tests --- tests/gentype_tests/typescript-react-example/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/gentype_tests/typescript-react-example/package.json b/tests/gentype_tests/typescript-react-example/package.json index 721b4bf4ba..b72e3819ed 100644 --- a/tests/gentype_tests/typescript-react-example/package.json +++ b/tests/gentype_tests/typescript-react-example/package.json @@ -2,9 +2,9 @@ "name": "@tests/gentype-react-example", "private": true, "scripts": { - "start": "rescript build -w", - "build": "rescript", - "clean": "rescript clean", + "start": "rescript legacy build -w", + "build": "rescript legacy build", + "clean": "rescript legacy clean", "typecheck": "tsc", "check": "biome check --changed --no-errors-on-unmatched ." }, From ba06140561821c0ed4f3b9fac30cbe5cfb5e9206 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 11:46:24 +0200 Subject: [PATCH 11/17] Build analysis tests with legacy build system --- tests/analysis_tests/tests-generic-jsx-transform/package.json | 4 ++-- .../tests-incremental-typechecking/package.json | 4 ++-- tests/analysis_tests/tests-reanalyze/deadcode/package.json | 4 ++-- tests/analysis_tests/tests-reanalyze/termination/package.json | 4 ++-- tests/analysis_tests/tests/package.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/analysis_tests/tests-generic-jsx-transform/package.json b/tests/analysis_tests/tests-generic-jsx-transform/package.json index e4afaad6f8..7a4f4861f8 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/package.json +++ b/tests/analysis_tests/tests-generic-jsx-transform/package.json @@ -2,8 +2,8 @@ "name": "@tests/generic-jsx-transform", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps" + "build": "rescript legacy build", + "clean": "rescript legacy clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests-incremental-typechecking/package.json b/tests/analysis_tests/tests-incremental-typechecking/package.json index 37e133730d..cd410d8afa 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/package.json +++ b/tests/analysis_tests/tests-incremental-typechecking/package.json @@ -2,8 +2,8 @@ "name": "@tests/incremental-typechecking", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps" + "build": "rescript legacy build", + "clean": "rescript legacy clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests-reanalyze/deadcode/package.json b/tests/analysis_tests/tests-reanalyze/deadcode/package.json index ec9305fdb8..c9ff3996f7 100644 --- a/tests/analysis_tests/tests-reanalyze/deadcode/package.json +++ b/tests/analysis_tests/tests-reanalyze/deadcode/package.json @@ -2,8 +2,8 @@ "name": "@tests/reanalyze-deadcode", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps" + "build": "rescript legacy build", + "clean": "rescript legacy clean" }, "dependencies": { "@rescript/react": "link:../../../dependencies/rescript-react", diff --git a/tests/analysis_tests/tests-reanalyze/termination/package.json b/tests/analysis_tests/tests-reanalyze/termination/package.json index 3f50de7763..02b2adf3e5 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/package.json +++ b/tests/analysis_tests/tests-reanalyze/termination/package.json @@ -2,8 +2,8 @@ "name": "@tests/reanalyze-termination", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps" + "build": "rescript legacy build", + "clean": "rescript legacy clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests/package.json b/tests/analysis_tests/tests/package.json index 2ada6a7cb0..01bbe0ecbb 100644 --- a/tests/analysis_tests/tests/package.json +++ b/tests/analysis_tests/tests/package.json @@ -2,8 +2,8 @@ "name": "@tests/analysis", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps" + "build": "rescript legacy build", + "clean": "rescript legacy clean" }, "dependencies": { "@rescript/react": "link:../../dependencies/rescript-react", From 5bf245e0442732db866566633efb311ea9b129d9 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 11:48:07 +0200 Subject: [PATCH 12/17] Build playground with legacy build system --- packages/playground/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/playground/package.json b/packages/playground/package.json index c36b14bd40..a384310433 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -3,9 +3,9 @@ "name": "playground", "type": "commonjs", "scripts": { - "clean": "rescript clean", + "clean": "rescript legacy clean", "test": "node ./playground_test.cjs", - "build": "rescript clean && rescript build && node scripts/generate_cmijs.mjs && rollup -c", + "build": "rescript legacy clean && rescript legacy build && node scripts/generate_cmijs.mjs && rollup -c", "upload-bundle": "node scripts/upload_bundle.mjs" }, "dependencies": { From 42deba892c51851b97ec6e062d4605396d16bd3b Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 12:07:48 +0200 Subject: [PATCH 13/17] Build more stuff with legacy build system --- .github/workflows/ci.yml | 2 +- analysis/examples/example-project/package.json | 2 +- analysis/examples/larger-project/package.json | 2 +- packages/playground/scripts/generate_cmijs.mjs | 6 +++--- rewatch/testrepo/package.json | 6 +++--- scripts/res/package.json | 6 +++--- tests/docstring_tests/package.json | 4 ++-- tests/tools_tests/package.json | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3108fb2d16..d0282276e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -569,7 +569,7 @@ jobs: working-directory: ${{ steps.tmp-dir.outputs.path }} - name: Test installation - run: npx rescript -h && npx rescript build && cat src/Test.res.js + run: npx rescript -h && npx rescript legacy build && cat src/Test.res.js shell: bash working-directory: ${{ steps.tmp-dir.outputs.path }} diff --git a/analysis/examples/example-project/package.json b/analysis/examples/example-project/package.json index b948ffc3a9..e5b47fcad1 100644 --- a/analysis/examples/example-project/package.json +++ b/analysis/examples/example-project/package.json @@ -6,6 +6,6 @@ "scripts": { "build": "rescript", "start": "rescript build -w", - "clean": "rescript clean -with-deps" + "clean": "rescript clean" } } diff --git a/analysis/examples/larger-project/package.json b/analysis/examples/larger-project/package.json index 1426ee18c6..6117fd6087 100644 --- a/analysis/examples/larger-project/package.json +++ b/analysis/examples/larger-project/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "rescript build -w", "build": "rescript build", - "clean": "rescript clean -with-deps" + "clean": "rescript clean" }, "devDependencies": { "react": "^16.13.1", diff --git a/packages/playground/scripts/generate_cmijs.mjs b/packages/playground/scripts/generate_cmijs.mjs index 56b29f50f0..3a6e2db33a 100644 --- a/packages/playground/scripts/generate_cmijs.mjs +++ b/packages/playground/scripts/generate_cmijs.mjs @@ -23,8 +23,8 @@ import { playgroundPackagesDir, } from "./common.mjs"; -exec("yarn rescript clean"); -exec("yarn rescript"); +exec("yarn rescript legacy clean"); +exec("yarn rescript legacy"); // We need to build the compiler's builtin modules as a separate cmij. // Otherwise we can't use them for compilation within the playground. @@ -58,7 +58,7 @@ function buildCmij(pkgDir, pkgName) { } /** - * @param {string} basename + * @param {string} basename * @return {boolean} */ function isCmij(basename) { diff --git a/rewatch/testrepo/package.json b/rewatch/testrepo/package.json index 2ed3978be5..96689ba989 100644 --- a/rewatch/testrepo/package.json +++ b/rewatch/testrepo/package.json @@ -17,10 +17,10 @@ }, "scripts": { "build": "../target/release/rewatch build .", - "build:rescript": "rescript build -with-deps", + "build:rescript": "rescript legacy build", "watch": "../target/release/rewatch watch .", - "watch:rescript": "rescript watch -with-deps", + "watch:rescript": "rescript legacy watch", "clean": "../target/release/rewatch clean .", - "clean:rescript": "rescript clean" + "clean:rescript": "rescript legacy clean" } } diff --git a/scripts/res/package.json b/scripts/res/package.json index 92da8de2bc..1168ebeb80 100644 --- a/scripts/res/package.json +++ b/scripts/res/package.json @@ -3,9 +3,9 @@ "type": "module", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps", - "dev": "rescript -w", + "build": "rescript legacy build", + "clean": "rescript legacy clean", + "dev": "rescript legacy -w", "apidocs:generate": "yarn build && node GenApiDocs.res.js" }, "dependencies": { diff --git a/tests/docstring_tests/package.json b/tests/docstring_tests/package.json index e59fa76a42..1cedbd5360 100644 --- a/tests/docstring_tests/package.json +++ b/tests/docstring_tests/package.json @@ -3,8 +3,8 @@ "type": "module", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps", + "build": "rescript legacy build", + "clean": "rescript legacy clean", "dev": "rescript -w" }, "dependencies": { diff --git a/tests/tools_tests/package.json b/tests/tools_tests/package.json index f1f0ea9a57..01d0070301 100644 --- a/tests/tools_tests/package.json +++ b/tests/tools_tests/package.json @@ -2,8 +2,8 @@ "name": "@tests/tools", "private": true, "scripts": { - "build": "rescript", - "clean": "rescript clean -with-deps", + "build": "rescript legacy build", + "clean": "rescript legacy clean", "dev": "rescript -w" }, "dependencies": { From cd5b2beba00298e274328f608d1fac819ccea584 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 13:34:42 +0200 Subject: [PATCH 14/17] CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40de08b975..5d6124294d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,10 @@ #### :boom: Breaking Change -- The legacy rescript cli can be called through rewatch via `rewatch legacy`. Arguments to rewatch need to be passed after the subcommand. Argument `--compiler-args` is now a subcommand `compiler-args`. https://github.com/rescript-lang/rescript/pull/7551 +- New `rewatch` based build system. https://github.com/rescript-lang/rescript/pull/7551 https://github.com/rescript-lang/rescript/pull/7593 + - The new `rewatch` based build system is now the default and is exposed through the `rescript` command. The `rewatch` command has been removed. + - The previous Ninja-based build system is now available via the `rescript legacy` subcommand. + - Argument `--compiler-args` is now a subcommand `compiler-args`. - Remove `String.getSymbol` from standard library. https://github.com/rescript-lang/rescript/pull/7571 - Remove `String.getSymbolUnsafe` from standard library. https://github.com/rescript-lang/rescript/pull/7571 - Remove `String.setSymbol` from standard library. https://github.com/rescript-lang/rescript/pull/7571 From a5bce43744cec7536a073c0cf08252c393ba9636 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 13:36:07 +0200 Subject: [PATCH 15/17] Testrepo: use pkg.pr.new --- rewatch/testrepo/package.json | 2 +- rewatch/testrepo/yarn.lock | 52 +++++++++++++++++------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/rewatch/testrepo/package.json b/rewatch/testrepo/package.json index 96689ba989..6f1fc22144 100644 --- a/rewatch/testrepo/package.json +++ b/rewatch/testrepo/package.json @@ -13,7 +13,7 @@ ] }, "dependencies": { - "rescript": "12.0.0-alpha.13" + "rescript": "https://pkg.pr.new/rescript-lang/rescript@6cac813" }, "scripts": { "build": "../target/release/rewatch build .", diff --git a/rewatch/testrepo/yarn.lock b/rewatch/testrepo/yarn.lock index beb6bf912d..2a52b20be7 100644 --- a/rewatch/testrepo/yarn.lock +++ b/rewatch/testrepo/yarn.lock @@ -5,37 +5,37 @@ __metadata: version: 8 cacheKey: 10c0 -"@rescript/darwin-arm64@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "@rescript/darwin-arm64@npm:12.0.0-alpha.13" +"@rescript/darwin-arm64@https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641": + version: 12.0.0-alpha.15 + resolution: "@rescript/darwin-arm64@https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rescript/darwin-x64@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "@rescript/darwin-x64@npm:12.0.0-alpha.13" +"@rescript/darwin-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@6cac813afdfe7b86803256838ac3ce09f7eed641": + version: 12.0.0-alpha.15 + resolution: "@rescript/darwin-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rescript/linux-arm64@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "@rescript/linux-arm64@npm:12.0.0-alpha.13" +"@rescript/linux-arm64@https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641": + version: 12.0.0-alpha.15 + resolution: "@rescript/linux-arm64@https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641" conditions: os=linux & cpu=arm64 languageName: node linkType: hard -"@rescript/linux-x64@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "@rescript/linux-x64@npm:12.0.0-alpha.13" +"@rescript/linux-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@6cac813afdfe7b86803256838ac3ce09f7eed641": + version: 12.0.0-alpha.15 + resolution: "@rescript/linux-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" conditions: os=linux & cpu=x64 languageName: node linkType: hard -"@rescript/win32-x64@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "@rescript/win32-x64@npm:12.0.0-alpha.13" +"@rescript/win32-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@6cac813afdfe7b86803256838ac3ce09f7eed641": + version: 12.0.0-alpha.15 + resolution: "@rescript/win32-x64@https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -87,15 +87,15 @@ __metadata: languageName: unknown linkType: soft -"rescript@npm:12.0.0-alpha.13": - version: 12.0.0-alpha.13 - resolution: "rescript@npm:12.0.0-alpha.13" +"rescript@https://pkg.pr.new/rescript-lang/rescript@6cac813": + version: 12.0.0-alpha.15 + resolution: "rescript@https://pkg.pr.new/rescript-lang/rescript@6cac813" dependencies: - "@rescript/darwin-arm64": "npm:12.0.0-alpha.13" - "@rescript/darwin-x64": "npm:12.0.0-alpha.13" - "@rescript/linux-arm64": "npm:12.0.0-alpha.13" - "@rescript/linux-x64": "npm:12.0.0-alpha.13" - "@rescript/win32-x64": "npm:12.0.0-alpha.13" + "@rescript/darwin-arm64": "https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641" + "@rescript/darwin-x64": "https://pkg.pr.new/rescript-lang/rescript/@rescript/darwin-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" + "@rescript/linux-arm64": "https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-arm64@6cac813afdfe7b86803256838ac3ce09f7eed641" + "@rescript/linux-x64": "https://pkg.pr.new/rescript-lang/rescript/@rescript/linux-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" + "@rescript/win32-x64": "https://pkg.pr.new/rescript-lang/rescript/@rescript/win32-x64@6cac813afdfe7b86803256838ac3ce09f7eed641" dependenciesMeta: "@rescript/darwin-arm64": optional: true @@ -111,9 +111,9 @@ __metadata: bsc: cli/bsc.js bstracing: cli/bstracing.js rescript: cli/rescript.js + rescript-legacy: cli/rescript-legacy.js rescript-tools: cli/rescript-tools.js - rewatch: cli/rewatch.js - checksum: 10c0/97ad8615b1a1cbace61e050b65a10bbe280c77b4fe693b99aee7d3c6bb0b2ebd284db16a7aec3d65179267dc610a9737fdf74197f6322b1281113fd588fe1b32 + checksum: 10c0/9ffce64bb8d440ba97ac038e7421a2eb92a6902c0a004101533fdd508990c939bcd1b8aa1da6914fcf678aeefd9f98bd613c675adf46ddfcdd81dd56024ae969 languageName: node linkType: hard @@ -121,6 +121,6 @@ __metadata: version: 0.0.0-use.local resolution: "testrepo@workspace:." dependencies: - rescript: "npm:12.0.0-alpha.13" + rescript: "https://pkg.pr.new/rescript-lang/rescript@6cac813" languageName: unknown linkType: soft From 80e7d1e0b9ed12f9f4c5136d0d7047ecce425de6 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 14:05:14 +0200 Subject: [PATCH 16/17] Fix installation test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0282276e7..92049f74e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -581,7 +581,7 @@ jobs: working-directory: rewatch/testrepo - name: Run rewatch integration tests - run: ./rewatch/tests/suite-ci.sh node_modules/.bin/rewatch + run: ./rewatch/tests/suite-ci.sh node_modules/.bin/rescript shell: bash publish: From 9dbcb42a2bc386e8e180bbd90c3bfc475ae1852f Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 4 Jul 2025 21:06:17 +0200 Subject: [PATCH 17/17] Undo comment change --- analysis/examples/larger-project/src/res_scanner.res | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/analysis/examples/larger-project/src/res_scanner.res b/analysis/examples/larger-project/src/res_scanner.res index b625fc4d5a..6b3b8ce34b 100644 --- a/analysis/examples/larger-project/src/res_scanner.res +++ b/analysis/examples/larger-project/src/res_scanner.res @@ -62,7 +62,7 @@ let position = scanner => { } /* Small debugging util -❯ echo 'let msg = "hello"' | ./lib/rescript-legacy.exe +❯ echo 'let msg = "hello"' | ./lib/rescript.exe let msg = "hello" ^-^ let 0-3 let msg = "hello"