fix(install): allow workspace members without version field#480
Conversation
Real-world tuist install (noora design system in pnpm-workspace.yaml, no `version`, nobody pins it via `workspace:`) hard-failed under aube where pnpm succeeded. The unconditional check predated the resolver's graceful handling and the comment's collision rationale doesn't hold: dep_path keys on (name, version) and two members have distinct names. Fall back to "0.0.0" when absent. workspace:* / workspace:^ / workspace:~ / bare-* siblings still link locally (those branches in resolve_workspace accept any ws version); a specific range like workspace:^2.0.0 correctly fails to satisfy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryRemoves the unconditional error for workspace members missing a Confidence Score: 5/5Safe to merge — targeted one-line fix with matching regression tests and no unintended side-effects on the resolver path. Change is a single No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "test(workspace): cover sibling `workspac..." | Re-trigger Greptile |
2153e26 to
b2c3cee
Compare
Locks the `"0.0.0"` fallback path: a member with no `version` whose
sibling pins it via `workspace:*` resolves through the wildcard
branch in `resolve_workspace`, the linker creates the cross-package
symlink, and `require("@test/lib")` returns the local code. Pairs
with the existing "no sibling depends on it" test added in the same
PR.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Benchmark changesPublic ratios: warm installs vs Bun 7x -> 9x; warm installs vs pnpm 11x -> 13x.
b3b8f5e vs b2a7c3f | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
Summary
Real-world failure: tuist/tuist#10584 tried to swap pnpm for aube and CI hit
workspace package noora at noora has no \version` field` from crates/aube/src/commands/install/mod.rs:1869. pnpm accepts the same repo without complaint.The unconditional check predates the resolver's current
workspace:*/workspace:^/workspace:~/ bare-*fallback. The comment's collision rationale ("two unversioned members under one dep_path") doesn't hold either:dep_pathkeys on(name, version)and two members have distinct names by construction.Fix: fall back to
"0.0.0"whenversionis absent.workspace:*/workspace:^/workspace:~/ bare-*siblings still link locally (those branches inresolve_workspaceaccept any ws version regardless). A specific range likeworkspace:^2.0.0against an unversioned member correctly fails to satisfy, matching pnpm.Test plan
cargo test(full suite green)cargo clippy --all-targets -- -D warningscargo fmt --checkmise run test:bats test/workspace.bats— 19 pass, including the new regression publish: move settings.toml into aube-settings; pin per-crate include lists #4🤖 Generated with Claude Code
Note
Medium Risk
Changes workspace package discovery to accept unversioned members by defaulting their version to
0.0.0, which can affect workspace resolution/linking behavior in monorepos. Risk is contained and covered by new Bats regression tests, but it touches core install/workspace logic.Overview
Allows
aube installto proceed when a workspace member’spackage.jsonomitsversionby defaulting the workspace version to0.0.0instead of hard-erroring during workspace manifest collection.Adds Bats regression coverage for (1) installing a workspace containing an unversioned standalone member and (2) ensuring a sibling dependency using
workspace:*correctly links to an unversioned workspace package.Reviewed by Cursor Bugbot for commit b3b8f5e. Bugbot is set up for automated code reviews on this repo. Configure here.