Conversation
… error
The TooRecentVersion error for a version range shares its template with
the NoMatchingVersion error ("No version matching X found for specifier
Y") but filled the slots in the opposite order, so it printed the package
name where the range belongs:
No version matching "regular-package" found for specifier "3.0.0" (blocked by minimum-release-age: 432000 seconds)
Pass the arguments in the same order as the sibling error so it reads:
No version matching "3.0.0" found for specifier "regular-package" (blocked by minimum-release-age: 432000 seconds)
Pin the exact text in minimum-release-age.test.ts for the exact-version
and range cases, and for the two sibling errors (dist-tag all blocked,
range with no match) whose order was already right.
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
|
Status: reproduced and fixed, waiting on CI. Reproduced with the released build by running the pinned assertions in Review so far: the automated review came back without findings, so there is nothing outstanding on the diff. |
|
Updated 3:05 PM PT - Aug 12th, 2026
❌ @robobun, your commit f26001c has 3 failures in
🧪 To try this PR locally: bunx bun-pr 37895That installs a local version of the PR into your bun-37895 --bun |
There was a problem hiding this comment.
LGTM — two-argument swap in the error format string, matching the sibling NoMatchingVersion branch.
What was reviewed:
- Confirmed the
(but package exists)branch atPackageManagerEnqueue.rs:803-805already passesversion.literalthenname; this change makesTooRecentVersionconsistent. - Grepped for other consumers of the old message order — only this file and the test file reference it.
- Test changes tighten loose regexes to exact strings and add the
^2.1.0range and dist-tag variants; new tests drain stdout/stderr concurrently and assert stderr before exitCode.
Extended reasoning...
Overview
The PR swaps two positional format arguments in the TooRecentVersion error branch of enqueue_dependency_with_main_and_success_fn (src/install/PackageManager/PackageManagerEnqueue.rs) so the version literal fills the "No version matching …" slot and the package name fills the "for specifier …" slot — the same order the adjacent NoMatchingVersion branch already uses. The test file replaces three loose toMatch(/…/) assertions with exact toContain strings and adds two new tests covering the ^2.1.0 range and the dist-tag variant, so all three related error messages are pinned side by side.
Security risks
None. This is a cosmetic reordering of interpolated values in a user-facing error string; no input handling, allocation, or control flow changes.
Level of scrutiny
Low. The native change is a two-line argument transposition with no type changes, and I verified against the current tree that the sibling branch (lines 803-805) uses exactly the order this PR adopts. A grep for the message text confirms nothing else in the repo (docs, other tests) asserts on the old order. The test additions follow the repo's conventions (await using on spawn, Promise.all for pipe draining, stderr asserted before exitCode, exact strings instead of regex).
Other factors
The PR description records that USE_SYSTEM_BUN=1 fails the three new pinned assertions and the debug build passes all 51, so the tests are load-bearing. No prior human review comments to address; the only timeline entries are a CodeRabbit rate-limit notice and the author's status update.
Problem
--minimum-release-age(orinstall.minimumReleaseAge) blocks every version that satisfies a dependency,bun installprints the package name and the requested version in each other's slots:No version matching "regular-package" found for specifier "3.0.0" (blocked by minimum-release-age: 432000 seconds).(but package exists)error fills the same template the other way round, so the two errors a user can get for one dependency disagree.minimumReleaseAge#22801, and this is the only place the message is produced.Fix
No version matching "3.0.0" found for specifier "regular-package" (blocked by minimum-release-age: 432000 seconds).Background
--minimum-release-age Nmakes install ignore versions published less than N seconds ago. If nothing that satisfies the dependency remains, install fails rather than taking a newer version.No version matching "X" found for specifier "Y", serves both "nothing satisfies X" and "the age gate blocked everything that does"; only the trailing parenthetical differs.latest) fails through a separate message naming the package and tag, so it is not affected.Original description
What
When
--minimum-release-age(orinstall.minimumReleaseAge) blocks every version that satisfies a range,bun installprinted the package name and the range in the wrong slots:The sibling error for a range that nothing satisfies fills the same template the other way around, and that is the order the rest of the install tests already assert on (
bun-install.test.ts,bun-install-registry.test.ts):After this change the age-gate variant reads the same way:
Why
The first slot of the template is the thing a version has to match, so it can only sensibly hold the requested version or range; the
TooRecentVersionbranch inPackageManagerEnqueue.rspassednamethere andversion.literalsecond. TheNoMatchingVersionbranch a few lines above passes them the other way around, so the two errors a user sees for the same dependency disagreed with each other. The dist-tag variant (Package "x" with tag "latest" not found (all versions blocked ...)) was already in the right order and is unchanged. This has been the case since the feature landed in #22801; it is the only place the message is produced, and nothing else in the repo (docs, other tests) depends on the old order.Repro
Fix
Swap the two format arguments in the
TooRecentVersionbranch ofenqueue_dependency_with_main_and_success_fnso they line up with the template and with theNoMatchingVersionbranch.Tests
test/cli/install/minimum-release-age.test.tsonly matched this error with a loose regex. It now pins the full text for:FindVersionError::TooRecent), fails before this change^2.1.0and*(FindVersionError::AllVersionsTooRecent), fails before this change(but package exists)variant, whose order was already correct, so the three messages are asserted side by side