Repository navigation
Conversation
…tories A workspace member that is a symlink to a directory elsewhere was not matched by a glob such as packages/*, so a workspace:* dependency on it failed to resolve. Listing the member path explicitly worked. The glob walker ran with follow_symlinks off. It now follows symlinks, with the walker's existing cycle check for links back into the chain.
|
Warning Review limit reached
On-demand reviews are free for the next 14 days. After that, they cost $0.25 per reviewed file. Or wait 15 seconds for your next included review. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (2)
Comment |
|
Updated 7:03 AM PT - Sep 6th, 2026
❌ @robobun, your commit 5430abc has 4 failures in
Add 🧪 To try this PR locally: bunx bun-pr 41567That installs a local version of the PR into your bun-41567 --bun |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Status: the new tests pass on every lane. The red lanes in the last two runs are unrelated to this change: the binary-size check (it compares against a newer main than this branch is based on), test-crypto-dh-leak.js (fails on main), and one-off failures in import-meta.test.js and parallel.test.ts that are reported for main triage. |
Problem
workspaces(packages/*). Aworkspace:*dependency on it fails:Workspace dependency "s" not foundon 1.4.2,s@workspace:* failed to resolveon 1.4.3-canary. Listing the member path explicitly ("packages/s") works. Reported in Workspace packages with symlinks are not discovered duringbun install#25801.WorkspaceMap(src/install/lockfile/Package/WorkspaceMap.rs:438) constructs theGlobWalkerwithfollow_symlinksoff, so a wildcard segment skips a symlinked directory.Fix
follow_symlinks: true. The walker already follows a symlink that a literal pattern segment names, so this only extends the same behavior to wildcard segments.GlobWalkerkeeps the chain of followed links and skips a target that is already on it (is_followed_link_cycle).packages/(packages/s), the same as an explicit entry for that path.test/cli/install/bun-workspaces.test.ts, one new case per linker, both fail on stock bun. The rest of that file (84 tests) andbad-workspace.test.tspass.Background
workspacesentries are split into literal paths and glob patterns. Literal paths are joined and read directly. Patterns run throughbun_glob::GlobWalkerwith<pattern>/package.json, and each match becomes a member.GlobWalker::init_with_cwdtakesfollow_symlinksanderror_on_broken_symlinks. With the first off, a symlink under a wildcard is reported as a file and never descended into.Notes
Repro on 1.4.3-canary (f42e980):
With the fix,
bun.locklistspackages/sunderworkspaces, the hoisted linker linksnode_modules/s, and the isolated linker linkspackages/b/node_modules/s.Two things are unchanged and out of scope here:
./*forworkspace:*), not theworkspacesglobs.packages/that points back at the root (packages/loop -> ..) now matchespackages/loop/package.json, so the root appears once more as a member named after itself. An explicit"packages/loop"entry has the same effect today.#25995 was an earlier PR for #25801 with the same one-line change. It was closed for inactivity.
no test proof · iteration 2 · platform-specific test(s) that do not run on this machine, deferring to CI, which covers all platforms: test/cli/install/bun-workspaces.test.ts