From 01986b23552d0a5b471273a30224817bd8ebf262 Mon Sep 17 00:00:00 2001 From: nojaf Date: Sat, 21 Jun 2025 11:48:11 +0200 Subject: [PATCH 1/2] Update rewatch compiler-args for alpha 14 --- server/src/incrementalCompilation.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/server/src/incrementalCompilation.ts b/server/src/incrementalCompilation.ts index bc56ed19a..2bbe8a48c 100644 --- a/server/src/incrementalCompilation.ts +++ b/server/src/incrementalCompilation.ts @@ -312,14 +312,20 @@ function getBscArgs( } } } - const compilerArgs = JSON.parse( - cp - .execFileSync(rewatchPath, [ + const rewatchArguments = semver.satisfies(project.rescriptVersion, ">=12.0.0-alpha.14", { includePrerelease: true }) ? [ + "compiler-args", + "--rescript-version", + project.rescriptVersion, + entry.file.sourceFilePath, + ] : [ "--rescript-version", project.rescriptVersion, "--compiler-args", entry.file.sourceFilePath, - ]) + ]; + const compilerArgs = JSON.parse( + cp + .execFileSync(rewatchPath, rewatchArguments) .toString() .trim() ) as RewatchCompilerArgs; From 79a8a11a62691fb5a387e7dd810d1a40faf984ce Mon Sep 17 00:00:00 2001 From: nojaf Date: Mon, 7 Jul 2025 20:37:15 +0200 Subject: [PATCH 2/2] Higher than alpha 14 --- server/src/incrementalCompilation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/incrementalCompilation.ts b/server/src/incrementalCompilation.ts index 2bbe8a48c..e180d7369 100644 --- a/server/src/incrementalCompilation.ts +++ b/server/src/incrementalCompilation.ts @@ -312,7 +312,7 @@ function getBscArgs( } } } - const rewatchArguments = semver.satisfies(project.rescriptVersion, ">=12.0.0-alpha.14", { includePrerelease: true }) ? [ + const rewatchArguments = semver.satisfies(project.rescriptVersion, ">12.0.0-alpha.14", { includePrerelease: true }) ? [ "compiler-args", "--rescript-version", project.rescriptVersion,