Skip to content

Commit f4ba829

Browse files
authored
Find per-platform binaries for v12.0.0-alpha.13+ (#1092)
* Find per-platform binaries * Add CHANGELOG
1 parent 261335b commit f4ba829

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
1313
## master
1414

15+
#### :rocket: New Feature
16+
17+
- 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
18+
1519
#### :bug: Bug fix
1620

1721
- 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

server/src/utils.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,16 @@ let findPlatformPath = (projectRootPath: p.DocumentUri | null) => {
739739

740740
let platformPath = path.join(rescriptDir, c.platformDir);
741741

742+
// Binaries have been split into optional platform-specific dependencies
743+
// since v12.0.0-alpha.13
744+
if (!fs.existsSync(platformPath)) {
745+
platformPath = path.join(
746+
rescriptDir,
747+
"..",
748+
`@rescript/${process.platform}-${process.arch}/bin`
749+
)
750+
}
751+
742752
// Workaround for darwinarm64 which has no folder yet in ReScript <= 9.1.4
743753
if (
744754
process.platform == "darwin" &&

0 commit comments

Comments
 (0)