Skip to content

Commit 2671852

Browse files
authored
Merge pull request #1109 from nojaf/remove-version-from-compiler-flags
Update compiler args for beta 2
2 parents e18a3cd + 167feb1 commit 2671852

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/incrementalCompilation.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,20 +331,20 @@ function getBscArgs(
331331
}
332332
}
333333

334-
const rewatchArguments = semver.satisfies(project.rescriptVersion, ">12.0.0-alpha.14", { includePrerelease: true }) ? [
334+
const rewatchArguments = semver.satisfies(project.rescriptVersion, ">=12.0.0-beta.2", { includePrerelease: true }) ? [
335335
"compiler-args",
336-
"--rescript-version",
337-
project.rescriptVersion,
338336
entry.file.sourceFilePath,
339337
] : [
340338
"--rescript-version",
341339
project.rescriptVersion,
342340
"--compiler-args",
343341
entry.file.sourceFilePath,
344342
];
343+
const bscExe = await utils.findBscExeBinary(entry.project.workspaceRootPath);
344+
const env = bscExe != null ? { RESCRIPT_BSC_EXE: bscExe } : undefined;
345345
const compilerArgs = JSON.parse(
346346
cp
347-
.execFileSync(rewatchPath, rewatchArguments)
347+
.execFileSync(rewatchPath, rewatchArguments, { env })
348348
.toString()
349349
.trim()
350350
) as RewatchCompilerArgs;

0 commit comments

Comments
 (0)