-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(nm): improves external soft links hoisting #4269
Conversation
Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
* Improves portal hoisting * Move hasUnhoistedDependencies into a separate function * Updates test, removes debugging code * Adds support and a test for deep nested portals hoisting * Fixes test description * Lint * Update packages/yarnpkg-nm/sources/hoist.ts Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> * Update packages/yarnpkg-nm/sources/hoist.ts Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> * Lint Co-authored-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
@@ -668,6 +684,9 @@ const hoistGraph = (tree: HoisterWorkTree, rootNodePath: Array<HoisterWorkTree>, | |||
} | |||
} | |||
|
|||
if (parentNode.dependencyKind === HoisterDependencyKind.EXTERNAL_SOFT_LINK && wereNodesHoisted) |
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.
Why only EXTERNAL_SOFT_LINK need anotherRound? I meet a bug that parentNode is a sub workspace and could not hoist its dependencies.
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.
Please open an issue with a reproduction.
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.
#5332 here is the issue with a reproduction repo.
What's the problem this PR addresses?
When all the dependencies were hoisted from nested portals the portals were not hoisted
Fixes: #4240
How did you fix it?
Applies additional hoisting rounds when external soft links run out of unhoisted dependencies
Checklist