Skip to content

hoistingLimits - optimize hoisting when transitive dependency matches root one#7196

Open
Knagis wants to merge 4 commits into
yarnpkg:masterfrom
Knagis:fix-6662-optimize
Open

hoistingLimits - optimize hoisting when transitive dependency matches root one#7196
Knagis wants to merge 4 commits into
yarnpkg:masterfrom
Knagis:fix-6662-optimize

Conversation

@Knagis

@Knagis Knagis commented Jun 22, 2026

Copy link
Copy Markdown

This PR follows up on #7189 - this version makes sure that the transitive dependencies are still hoisted up to the hoist border.

It also adds a skipped unit test for potential future fix - when a transitive dependency matches the root one, it can be "hoisted" to root - it isn't hoisting since the dependency already exists. The PR does not include an implementation for this scenario.

Resolves #6662

@larixer

larixer commented Jun 26, 2026

Copy link
Copy Markdown
Member

@Knagis Thank you for the followup PR! Does it handle root workspace only or does it support non-root workspaces too?

@Knagis

Knagis commented Jun 26, 2026

Copy link
Copy Markdown
Author

i think this should work with either, it doesn't add any special meaning to root, instead it makes all hoist border nodes unique.

@larixer

larixer commented Jun 26, 2026

Copy link
Copy Markdown
Member

I see, good idea! Thank you, looks good!

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.

[Bug?]: nmHoistingLimits: dependencies incorrectly hoists past some dependencies with @scope names

2 participants