-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo support (e.g. yarn workspaces) #19
Merged
Merged
Conversation
This file contains 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
We introduce a rescript#UpdateProjectEnv() function to update the binary paths on a per file basis. Also added an augroup in for .res / .resi files to automatically update the environment on file open / new file creation. Format() and Build() also do an update before executing any logic. We also make Build() a little bit more flexible by allowing a string argument for extra parameters.
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.
Based off #18
Fixes #17
This PR implements the same tool detection heuristic as discussed in the accompanying rescript-vscode PR.
We still need sign off by hongbo if this is the correct implementation from a compiler perspective
For those who want to try this configuration in their local setup:
Update 28th Dec:
@IwanKaramazow created
a draft for a "ReScript Project Specification"(this was deemed to be too complex, we found a better solution, see next update).Update 6th Jan, 2021:
The aforementioned specification was way too complex, the team settled on a more straightforward approach that is now merged in rescript-vscode (see code here). More details on the change can be found in this PR.
The fallback is to use thenode_modules/.bin
wrappers forbsc
andbsb
. This works, becauseyarn workspaces
doesn't seem to touch.bin
folders, so it's guaranteed to exist. It's not ideal since node wrappers cause slower process execution, but there is no other better reliable way right now.Our solution we proposed before works just fine without the bsb wrapper downsides. Only problem was to fix project env detection on each file open etc. This is fixed now.