-
Notifications
You must be signed in to change notification settings - Fork 468
Read bs-dev-dependencies if --dev was passed. #7650
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
Read bs-dev-dependencies if --dev was passed. #7650
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
Okay, I discovered something interesting here. The rules of https://rescript-lang.org/docs/manual/v12.0.0/build-configuration#bs-dependencies-bs-dev-dependencies are not respected in Rewatch right now. I can have something like: {
"name": "dev-dep-sample",
"sources": [
{
"dir": "src",
"subdirs": true
},
{
"dir": "test",
"subdirs": true,
"type": "dev"
}],
"package-specs": {
"module": "esmodule",
"in-source": true
},
"suffix": ".res.mjs",
"bs-dependencies": [],
"bs-dev-dependencies": [
"@rescript/webapi"
],
"bsc-flags": []
} And
where
rescript/rewatch/src/build/compile.rs Lines 351 to 364 in 556545d
type: dev and can thus use bs-dev-dependencies.
|
Hmm, this is proving to be somewhat difficult. However, for rescript/rewatch/src/build/compile.rs Lines 360 to 362 in 0c36cb5
|
@jfrolich I added some code to traverse the rescript.json in case of I'm unsure how to proceed with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work!
This reverts commit 3a67a8f.
Fixes #7638, I believe.
I tested https://github.com/dsiu/rewatch-dev-deps-build-test locally.
I will add a test later, but please feel free to take a look and let me know if this logic is correct.