From 9f963c3b4aa12485c8008e8d342c5d50dd053b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Fri, 9 May 2025 22:55:33 +0100 Subject: [PATCH 1/2] Find per-platform binaries --- server/src/utils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/src/utils.ts b/server/src/utils.ts index 63d52bebe..dbb63a526 100644 --- a/server/src/utils.ts +++ b/server/src/utils.ts @@ -739,6 +739,16 @@ let findPlatformPath = (projectRootPath: p.DocumentUri | null) => { let platformPath = path.join(rescriptDir, c.platformDir); + // Binaries have been split into optional platform-specific dependencies + // since v12.0.0-alpha.13 + if (!fs.existsSync(platformPath)) { + platformPath = path.join( + rescriptDir, + "..", + `@rescript/${process.platform}-${process.arch}/bin` + ) + } + // Workaround for darwinarm64 which has no folder yet in ReScript <= 9.1.4 if ( process.platform == "darwin" && From 5479d3149856bc73f25705a8af7b20d5349c7b96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Sun, 11 May 2025 14:23:21 +0100 Subject: [PATCH 2/2] Add CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fb49b1ce..792849447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ ## master +#### :rocket: New Feature + +- Find `bsc.exe` and `rescript-code-editor-analysis.exe` from platform-specific packages used by ReScript `v12.0.0-alpha.13`+.https://github.com/rescript-lang/rescript-vscode/pull/1092 + #### :bug: Bug fix - Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting module-related type errors https://github.com/rescript-lang/rescript-vscode/pull/1090