Skip to content

Conversation

nojaf
Copy link
Member

@nojaf nojaf commented Oct 2, 2025

See sample in rescript-lang/end-to-end#1

Adds some fixes for #1106

package a has a compiler-info.json of:

{
  "version": "12.0.0-beta.13",
  "bsc_path": "/Users/nojaf/Projects/rescript-end-to-end/repos/pnpm/monorepo/node_modules/.pnpm/@rescript+darwin-arm64@12.0.0-beta.13/node_modules/@rescript/darwin-arm64/bin/bsc.exe",
  "bsc_hash": "1263ce9a1dad7e30b855a8221d361b1147c2c1541a3f2600d09e954deb989ae6",
  "rescript_config_hash": "68d9b6cfd83ac38869b2afe037b4fcbbbb9faa016302a2f26d45a1e7875e1479",
  "runtime_path": "/Users/nojaf/Projects/rescript-end-to-end/repos/pnpm/monorepo/node_modules/.pnpm/@rescript+runtime@12.0.0-beta.13/node_modules/@rescript/runtime",
  "generated_at": "1759387416473"
}

}

const projectRewatchLockfiles = [
...Array.from(workspaceFolders).map((w) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReScript lock was located at workspace level:
lib/rescript.lock
Was absent on packages/a/lib level, so it assumed bsb and failed.

"..",
`@rescript/${target}/bin.js`,
);
const { binPaths } = await import(targetPackagePath);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dynamic import of rescript/../@rescript-platform package fails on pnpm because it is located deeply in the node_module/.pnpm folder.
node_modules/.pnpm/@rescript+darwin-arm64@12.0.0-beta.13/node_modules/@rescript/darwin-arm64/bin/
So, using the path from compiler-info.json is the better play.

@nojaf nojaf requested a review from zth October 2, 2025 07:11
Copy link
Member

@zth zth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Changelog perhaps?

@nojaf nojaf merged commit 4bb6096 into rescript-lang:master Oct 2, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants