Skip to content

fix(install): allow workspace members without version field#480

Merged
jdx merged 2 commits intomainfrom
claude/magical-bassi-5be56b
May 2, 2026
Merged

fix(install): allow workspace members without version field#480
jdx merged 2 commits intomainfrom
claude/magical-bassi-5be56b

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented May 2, 2026

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_path keys on (name, version) and two members have distinct names by construction.

Fix: fall back to "0.0.0" when version is absent. workspace:* / workspace:^ / workspace:~ / bare-* siblings still link locally (those branches in resolve_workspace accept any ws version regardless). A specific range like workspace:^2.0.0 against an unversioned member correctly fails to satisfy, matching pnpm.

Test plan

🤖 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 install to proceed when a workspace member’s package.json omits version by defaulting the workspace version to 0.0.0 instead 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.

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-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 2, 2026

Greptile Summary

Removes the unconditional error for workspace members missing a version field, replacing it with a "0.0.0" fallback in install/mod.rs. Two new bats regression tests cover the standalone-unversioned case and the workspace:* sibling-link path, confirming the "0.0.0" fallback round-trips through the resolver correctly.

Confidence Score: 5/5

Safe to merge — targeted one-line fix with matching regression tests and no unintended side-effects on the resolver path.

Change is a single unwrap_or("0.0.0") substitution with clear justification, backed by two new integration tests that cover both the direct regression and the workspace:* linking path. No P1/P0 findings.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube/src/commands/install/mod.rs Replaces the unconditional error for missing version with unwrap_or("0.0.0") fallback; the surrounding resolver logic is unchanged and the fix is correct.
test/workspace.bats Adds two regression tests: one for standalone unversioned member install, and one for workspace:* sibling-link to an unversioned member; both are well-structured and cover the claimed behaviour.

Reviews (3): Last reviewed commit: "test(workspace): cover sibling `workspac..." | Re-trigger Greptile

Comment thread test/workspace.bats
@jdx jdx force-pushed the claude/magical-bassi-5be56b branch from 2153e26 to b2c3cee Compare May 2, 2026 20:11
@jdx jdx enabled auto-merge (squash) May 2, 2026 20:14
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>
@jdx jdx merged commit 489b4ad into main May 2, 2026
19 checks passed
@jdx jdx deleted the claude/magical-bassi-5be56b branch May 2, 2026 20:23
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

Benchmark changes

Public ratios: warm installs vs Bun 7x -> 9x; warm installs vs pnpm 11x -> 13x.

Benchmark aube bun pnpm
Fresh install (warm cache) 332ms -> 288ms (-13%) 2242ms -> 2466ms (+10%) 3500ms -> 3858ms (+10%)
CI install (warm cache, GVS disabled) 930ms -> 1154ms (+24%) 1447ms -> 2317ms (+60%) 2475ms -> 3325ms (+34%)
CI install (cold cache, GVS disabled) 4364ms -> 4726ms (+8%) 4083ms -> 4780ms (+17%) 5380ms -> 6985ms (+30%)

b3b8f5e vs b2a7c3f | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex.

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.

1 participant