-
-
Notifications
You must be signed in to change notification settings - Fork 937
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
fix: honor never/only-built-dependencies in workspace setup #7141
fix: honor never/only-built-dependencies in workspace setup #7141
Conversation
💖 Thanks for opening this pull request! 💖 |
Thanks, I'll review it later. |
@zkochan any idea about the patching errors in the CI tests? Not sure where do they come from |
That is a new error for sure. I haven't seen it in the past. |
b3363b8
to
ace3bab
Compare
@zkochan Update: The reason of the test failure is due to the change in the argument supplied to |
@@ -363,7 +364,7 @@ export async function recursive ( | |||
{ | |||
...installOpts, | |||
...localConfig, | |||
...getOptionsFromRootManifest(manifest), | |||
...getOptionsFromRootManifest(opts.rootProjectManifest ?? manifest), |
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.
@zkochan so the patching error is due to the earlier proposed change (opts.rootProjectManifest ?? {}
instead of opts.rootProjectManifest ?? manifest
in the latest update).
In the latest update, I uses the project manifest as a fallback instead of an empty object.
Now the tests will pass as you can see those in mine:
https://github.com/alvis/pnpm/actions/runs/6338054374
The change is harmless but I guess there is a bug in the test because the earlier proposed logic is identical to the usage in other places in the codebase, and it makes more sense than using the project manifest e.g.
...getOptionsFromRootManifest(config.rootProjectManifest ?? {}), |
...getOptionsFromRootManifest(opts.rootProjectManifest ?? {}), |
Regardless, I'm looking forward to your review and get it merged.
a5b214b
to
a78b202
Compare
Congrats on merging your first pull request! 🎉🎉🎉 |
Fix #7135 #5407
In the current implementation there are 2 bugs that prevent
pnpm.neverBuiltDependencies
andpnpm.onlyBuiltDependencies
to work under a workspace that doesn't share a single lockfilegetOptionsFromRootManifest
calls are wrong. They were incorrectly passed the project manifest instead of the intended root project manifest.neverBuiltDependencies
andonlyBuiltDependencies
settings are not implemented in the recursive logic.This PR provides a fix to the bugs above.