Repository navigation
install: keep the self-contained workspace setting out of the lockfile #41215
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
Merged
dylan-conway
merged 7 commits into
main
from
robobun/222c43ff/frozen-lockfile-hoisting-limits
Sep 3, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4717fb4
install: keep the recorded self-contained workspaces under --frozen-l…
robobun 9bcc025
docs: say that bun.lockb also records self-contained workspaces
robobun 9df44ca
install: shorten the self-contained workspace comments
robobun 6f67b12
install: one-line comments for the self-contained set
robobun 4ca73bb
ci: retrigger
robobun 9422ad6
install: fail --frozen-lockfile when the manifests change a recorded …
robobun 0088d4b
install: keep the self-contained workspace setting out of the lockfile
robobun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back 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.
🔴 Dropping the barrier from the
Resolvabletree makesremove_collapsed_copiesdelete parts of a self-contained workspace'snode_modules: afterbun update/bun dedupe/bun audit fixwith the hoisted linker, any package in<ws>/node_modulesthat is also installed at the root is treated as a collapsed duplicate and removed, so the workspace is no longer self-contained (base kept it because both trees carried the barrier). Fix: make the post-install collapsed-copy pass reason about the barrier-applied layout — e.g. skip workspaces inself_contained_workspaces(and their subtrees) inprune::remove_collapsed_copies, or compare against a Filter-built tree there.Extended reasoning...
Repo: root and workspace
webdepend onbar@ 0.0.2; workspacedesktop(self-contained viainstallConfig.hoistingLimits) transitively depends onbar@ 0.0.2(same test fixture in bun-workspaces-self-contained.test.ts).bun installlays outnode_modules/barandapps/desktop/node_modules/bar. Runbun update.install_hoisted_packagesrunsfilter()(barrier applied) so both copies are (re)installed, then its scopeguard restoresmanager.lockfile.buffers.treesto theresolve()output fromCloner::flush, which after this change is built withself_contained = Vec::new().remove_collapsed_copies(install_with_manager.rs:899, gated on Dedupe/Audit/Update) therefore buildsnewfrom a barrier-less tree: no tree exists atnode_modules/desktop/node_modules(surviving = None) andold_rowsis empty. Its workspace pass (prune.rs:1378-1398) scansapps/desktop/node_modules; forbar,was_row = false, so it evaluates!new.collapsed_into_ancestor(0, "bar").baris expected at root in the barrier-lessnewandverified_installedfindsnode_modules/bar…Verification: normal — the diff at src/install/lockfile.rs:1364-1369 gates
self_contained_workspace_ids()toBuilderMethod::Filteronly, soresolve()(line 1329,Resolvable) now builds a barrier-less tree. The base version (git show e26b4e1:src/install/lockfile.rs,let self_contained = self.self_contained_workspace_ids();was unconditional) applied the barrier to both. Trace on `bun update… | normal…