Use platform specific rewatch binary#1101
Merged
zth merged 3 commits intorescript-lang:masterfrom Jun 3, 2025
Merged
Conversation
nojaf
commented
May 27, 2025
server/src/incrementalCompilation.ts
Outdated
| } else if (value.startsWith("..") && value.endsWith("ocaml")) { | ||
| // This should be the lib/ocaml folder of the project | ||
| // This is a hack to support incremental compilation in monorepos | ||
| callArgs.push("-I", path.resolve(entry.project.incrementalFolderPath, "..", "..", "ocaml")); |
Member
Author
There was a problem hiding this comment.
I was not getting any diagnostics for the following file:
- rescript.json
- packages
- samples
- rescript.json
- src/FlappyBird.res
- samples
bunx rewatch --rescript-version 12.0.0-alpha.14 --compiler-args packages/samples/src/FlappyBird.res
gave:
{
"compiler_args": [
"-I",
"../ocaml",
"-I",
"/Users/nojaf/Projects/rescript-kaplay/packages/rescript-kaplay/lib/ocaml",
"-uncurried",
"-bs-package-name",
"@nojaf/samples",
"-bs-package-output",
"esmodule:src:.res.mjs",
"-bs-v",
"12.0.0-alpha.14",
"src/FlappyBird.ast"
],
"parser_args": [
"-bs-v",
"12.0.0-alpha.14",
"-uncurried",
"-absname",
"-bs-ast",
"-o",
"src/FlappyBird.ast",
"../../src/FlappyBird.res"
]
}Where -I "../ocaml" is supposed to be packages/samples/lib/ocaml.
I was getting error for my other modules (inside the same project) not being found.
@jfrolich any ideas why this happens?
With this fix, everything works like a charm again.
Member
Author
There was a problem hiding this comment.
@zth as Jaap mentioned on Discord, we should run this from bs/lib.
I changed this for Rewatch only, to not impact any existing bsb users.
Member
|
LGTM ✔️ |
Member
Author
|
@zth can I please get a review here? |
zth
approved these changes
Jun 3, 2025
Member
Author
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #1091
Please take a look at this as well @mediremi