-
Notifications
You must be signed in to change notification settings - Fork 469
Fix sourcedirs.json generation #7671
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
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/win32-x64
commit: |
@@ -455,6 +461,11 @@ This inconsistency will cause issues with package resolution.\n", | |||
); | |||
} | |||
|
|||
let is_local_dep = { |
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.
This is a simpler fix for the problem.
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.
Great!
@@ -65,7 +66,7 @@ pub fn print(buildstate: &BuildState) { | |||
let (dirs, pkgs): (Vec<AHashSet<Dir>>, Vec<AHashMap<PackageName, AbsolutePath>>) = buildstate | |||
.packages | |||
.par_iter() | |||
.filter(|(_name, package)| !package.is_root) | |||
.filter(|(_name, package)| package.is_local_dep && package.source_files.is_some()) |
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.
In case there is only a single rescript.json, this will also ensure it gets processed.
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.
The goal here is to find all packages except for the root package, why is this behavior changing?
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.
oh the root is never a local dep, and we don't want to have any other deps? Maybe you should update the comment if people run into this code later?
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.
# Conflicts: # rewatch/src/sourcedirs.rs
64e3c2d
to
9e1a059
Compare
This reverts commit 170c1a6.
Fixes #7670
While testing this locally, I did notice I needed to add a bit more logic to ensure a symbolic linked package in the node_modules is still considered as non local package.
Could already use some eyes on this!