Skip to content
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

Add rescript.settings.platformPath and correctly determine its default value #573

Merged
merged 6 commits into from
Sep 23, 2022

Conversation

Minnozz
Copy link
Contributor

@Minnozz Minnozz commented Sep 5, 2022

This introduces the setting rescript.settings.platformPath and fixes the algorithm to find it if the setting is not specified. This should fix formatting in monorepos, which relies on bsc.exe.

Fixes #572

@Minnozz Minnozz changed the title Add rescript.settings.platformDir and fix its default value Add rescript.settings.platformDir and correctly determine its default value Sep 5, 2022
@Minnozz Minnozz changed the title Add rescript.settings.platformDir and correctly determine its default value Add rescript.settings.platformPath and correctly determine its default value Sep 5, 2022
@Minnozz Minnozz marked this pull request as ready for review September 5, 2022 19:26
@tsnobip
Copy link
Contributor

tsnobip commented Sep 23, 2022

I tested it on my monorepo and it did fix my autoformatting issue! Thanks @Minnozz!

@fhammerschmidt
Copy link
Member

Tried it on two monorepo projects. I had no issues before, but also did not find any regression with this build.

@zth
Copy link
Collaborator

zth commented Sep 23, 2022

@Minnozz I'm inclined to merge this since it seems to fix setups that recently broke.

Would you be available to help fix unforeseen issues that might come from this? Not necessarily thinking there will be any issues, but a lot of the ad hoc monorepo fixes we've merged has broken someone else's monorepo setup. Hence my question.

@Minnozz
Copy link
Contributor Author

Minnozz commented Sep 23, 2022

@zth Yes, I'll do my best to fix any issues

@zth
Copy link
Collaborator

zth commented Sep 23, 2022

@zth Yes, I'll do my best to fix any issues

Thank you!

@zth zth merged commit e79872c into rescript-lang:master Sep 23, 2022
zth pushed a commit that referenced this pull request Sep 28, 2022
…t value (#573)

* Tweak description of rescript.settings.binaryPath

* Add rescript.settings.platformPath

* Add utils.findFilePathFromProjectRoot()

* Remove unused utils.findBscBinary()

* Rewrite algorithm to find bsc.exe based on platformPath

Should fix formatting in monorepos.

Fixes #572

Co-authored-by: Paul Tsnobiladzé <paul.tsnobiladze@gmail.com>
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.

Formatting document fails in monorepo
4 participants