Repository navigation
fix(overrides): measure a workspace: path in an override from the workspace - #17016
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17016 +/- ##
==========================================
- Coverage 92.53% 92.53% -0.01%
==========================================
Files 1775 1775
Lines 228495 228577 +82
==========================================
+ Hits 211441 211512 +71
- Misses 17054 17065 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked and injected workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4202451941400005,
"stddev": 0.13640202607422705,
"median": 2.41401715424,
"user": 1.3471966400000002,
"system": 1.43349628,
"min": 2.25656295474,
"max": 2.65728118674
},
{
"command": "pacquet@main",
"mean": 2.3958335229400003,
"stddev": 0.12444069586305004,
"median": 2.3420741507400002,
"user": 1.2758211400000001,
"system": 1.3596288799999998,
"min": 2.2693917797400003,
"max": 2.6061886637400002
},
{
"command": "pnpr@HEAD",
"mean": 1.4849516827399998,
"stddev": 0.12235191494047853,
"median": 1.51674950474,
"user": 1.1485686400000001,
"system": 1.2477544799999998,
"min": 1.30495829674,
"max": 1.62557141474
},
{
"command": "pnpr@main",
"mean": 1.39107836424,
"stddev": 0.11315143599264678,
"median": 1.35481350474,
"user": 1.1602813399999998,
"system": 1.26920128,
"min": 1.29835312774,
"max": 1.66483661774
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24918432026000006,
"stddev": 0.04140864437113518,
"median": 0.23354276606000002,
"user": 0.28863946,
"system": 0.6124757399999999,
"min": 0.21927653156000002,
"max": 0.35864396956000005
},
{
"command": "pacquet@main",
"mean": 0.27501519116000006,
"stddev": 0.06643009241585435,
"median": 0.23535763056000003,
"user": 0.31613495999999996,
"system": 0.69682324,
"min": 0.23092330356000002,
"max": 0.39404266856000003
},
{
"command": "pnpr@HEAD",
"mean": 0.23922650956,
"stddev": 0.007776001519054356,
"median": 0.23680816006000005,
"user": 0.26968185999999994,
"system": 0.5432357399999999,
"min": 0.22787973356000002,
"max": 0.25262840756000005
},
{
"command": "pnpr@main",
"mean": 0.24350085096000001,
"stddev": 0.008324003589808329,
"median": 0.24399946406000003,
"user": 0.28515245999999994,
"system": 0.5474434400000001,
"min": 0.23057962056000003,
"max": 0.25562660856
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008114919996637176,
"stddev": 0.0008298970674555288,
"median": 0.00793685874,
"user": 0.005144627433628318,
"system": 0.0037633575221238916,
"min": 0.006637771740000001,
"max": 0.01221463874
},
{
"command": "pacquet@main",
"mean": 0.008235440374730533,
"stddev": 0.0006595670692867131,
"median": 0.008065746240000001,
"user": 0.0054492251497006,
"system": 0.003638788323353294,
"min": 0.007034647740000001,
"max": 0.01062044474
},
{
"command": "pnpr@HEAD",
"mean": 0.008284999424713377,
"stddev": 0.0009013466384768834,
"median": 0.00798276974,
"user": 0.0049771980891719775,
"system": 0.004126040445859872,
"min": 0.006952073740000001,
"max": 0.011873796740000001
},
{
"command": "pnpr@main",
"mean": 0.011629069255850145,
"stddev": 0.003753954067015713,
"median": 0.012405017740000001,
"user": 0.006946550720461098,
"system": 0.005634263400576369,
"min": 0.0067221897400000005,
"max": 0.02208388274
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.007496544558657715,
"stddev": 0.0002928341459252765,
"median": 0.0074912482600000005,
"user": 0.004554268590604025,
"system": 0.0035174071140939593,
"min": 0.00690912426,
"max": 0.009235879260000001
},
{
"command": "pacquet@main",
"mean": 0.00750166906996886,
"stddev": 0.00038311407448402956,
"median": 0.00747036126,
"user": 0.004563730778816201,
"system": 0.0035524539563862936,
"min": 0.00683339126,
"max": 0.01044408026
},
{
"command": "pnpr@HEAD",
"mean": 0.007920071841939805,
"stddev": 0.00035304400765021857,
"median": 0.00791002726,
"user": 0.004634257591973243,
"system": 0.004048959464882943,
"min": 0.00715409426,
"max": 0.00989533826
},
{
"command": "pnpr@main",
"mean": 0.007930332631428571,
"stddev": 0.0003519972354674219,
"median": 0.007910922760000001,
"user": 0.004790733571428569,
"system": 0.003927278714285716,
"min": 0.00714186126,
"max": 0.009762789260000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5797352402400002,
"stddev": 0.13195941075171147,
"median": 2.51986019884,
"user": 2.00233306,
"system": 1.6930268800000001,
"min": 2.48607133534,
"max": 2.85667739634
},
{
"command": "pacquet@main",
"mean": 2.5201384019399997,
"stddev": 0.02924890960877361,
"median": 2.51102854334,
"user": 1.8551046599999998,
"system": 1.56823538,
"min": 2.48091176834,
"max": 2.59043153134
},
{
"command": "pnpr@HEAD",
"mean": 1.5159379143399998,
"stddev": 0.10144484007224687,
"median": 1.48026717584,
"user": 1.22838346,
"system": 1.2778876800000003,
"min": 1.39322348034,
"max": 1.70130363934
},
{
"command": "pnpr@main",
"mean": 1.48936962744,
"stddev": 0.05649881006890904,
"median": 1.48105533284,
"user": 1.15052766,
"system": 1.2447827800000002,
"min": 1.41908045734,
"max": 1.60918418634
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.54886985278,
"stddev": 0.11979273223284534,
"median": 0.5084992929800001,
"user": 0.77517666,
"system": 0.9494162599999999,
"min": 0.43159349998,
"max": 0.72014227898
},
{
"command": "pacquet@main",
"mean": 0.44028992667999994,
"stddev": 0.017180067835230406,
"median": 0.43676675598000003,
"user": 0.64674536,
"system": 0.7545423600000001,
"min": 0.41338192398,
"max": 0.46856034798
},
{
"command": "pnpr@HEAD",
"mean": 0.29261321598,
"stddev": 0.010868438279986245,
"median": 0.29627914548,
"user": 0.24951936,
"system": 0.5732646600000001,
"min": 0.27092894298,
"max": 0.30641552297999997
},
{
"command": "pnpr@main",
"mean": 0.29263302728,
"stddev": 0.009250794903897849,
"median": 0.29175495298,
"user": 0.24216605999999996,
"system": 0.58177056,
"min": 0.28109921298,
"max": 0.30588951098
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6011413787600002,
"stddev": 0.019593700793240174,
"median": 1.60402650776,
"user": 0.87812048,
"system": 0.8687264600000001,
"min": 1.56518741476,
"max": 1.63206702376
},
{
"command": "pacquet@main",
"mean": 1.67888672726,
"stddev": 0.13060132928831664,
"median": 1.61408546676,
"user": 1.0730563800000001,
"system": 1.0473956599999998,
"min": 1.5790035047600002,
"max": 1.95441850776
},
{
"command": "pnpr@HEAD",
"mean": 0.28941204666000003,
"stddev": 0.01767034398277032,
"median": 0.28120493276,
"user": 0.25757328,
"system": 0.5372351599999999,
"min": 0.27493379876,
"max": 0.32842253076000005
},
{
"command": "pnpr@main",
"mean": 0.28324985336,
"stddev": 0.010412152475172019,
"median": 0.28596118076000004,
"user": 0.24507848000000002,
"system": 0.50568496,
"min": 0.26806326876000003,
"max": 0.29770815576000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.408143632,
"stddev": 0.08612054390443258,
"median": 0.44225224530000007,
"user": 0.4082976800000001,
"system": 0.17922239999999998,
"min": 0.2778580063,
"max": 0.4888550723000001
},
{
"command": "pacquet@main",
"mean": 0.28107205490000003,
"stddev": 0.017173422385712088,
"median": 0.2814917403,
"user": 0.26597008,
"system": 0.11073649999999999,
"min": 0.25627082430000003,
"max": 0.30913387830000005
},
{
"command": "pnpr@HEAD",
"mean": 0.09896709497857141,
"stddev": 0.0027316146556115193,
"median": 0.0990206978,
"user": 0.04256410142857142,
"system": 0.017976771428571424,
"min": 0.0948594993,
"max": 0.10373475730000001
},
{
"command": "pnpr@main",
"mean": 0.09863296247857138,
"stddev": 0.002314318443924836,
"median": 0.0987202478,
"user": 0.04160967285714284,
"system": 0.018151378571428574,
"min": 0.0932610073,
"max": 0.10326486730000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23502923693333333,
"stddev": 0.00649261030726462,
"median": 0.23406008460000002,
"user": 0.24085856666666666,
"system": 0.05610636666666666,
"min": 0.22764539060000002,
"max": 0.24527028760000003
},
{
"command": "pacquet@main",
"mean": 0.23574195193333333,
"stddev": 0.019905207151874247,
"median": 0.23669424860000002,
"user": 0.23722634444444443,
"system": 0.05056936666666667,
"min": 0.20942880860000002,
"max": 0.2699315996
},
{
"command": "pnpm@HEAD",
"mean": 3.5157584117111114,
"stddev": 0.09949294582319294,
"median": 3.5146880156,
"user": 5.282477677777779,
"system": 0.37951114444444445,
"min": 3.3411796716,
"max": 3.6221117426
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20192594739428574,
"stddev": 0.0034328495755519177,
"median": 0.20070673318000004,
"user": 0.1596288485714286,
"system": 0.07605973714285715,
"min": 0.19693739268000002,
"max": 0.20926594568
},
{
"command": "pacquet@main",
"mean": 0.21999720646571427,
"stddev": 0.02671795442965883,
"median": 0.20640841218000003,
"user": 0.1736947057142857,
"system": 0.08329709428571429,
"min": 0.19719835568000002,
"max": 0.26595560968000004
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.12040875816551723,
"stddev": 0.01226580038841423,
"median": 0.1196427352,
"user": 0.04638598827586206,
"system": 0.08299295172413795,
"min": 0.0953087402,
"max": 0.14923825220000003
},
{
"command": "pacquet@main",
"mean": 0.08930076520000002,
"stddev": 0.021208457144931855,
"median": 0.0761532277,
"user": 0.03574872181818182,
"system": 0.060192354545454546,
"min": 0.0674823892,
"max": 0.13286600820000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.48580325672,
"stddev": 0.12805119701036105,
"median": 4.471140951520001,
"user": 1.5495438199999998,
"system": 1.5980540799999998,
"min": 4.348402822020001,
"max": 4.68060625802
},
{
"command": "pacquet@main",
"mean": 4.4592817703200005,
"stddev": 0.11868972213904735,
"median": 4.41131888402,
"user": 1.36050842,
"system": 1.4313442799999998,
"min": 4.34714621102,
"max": 4.70586575302
},
{
"command": "pnpr@HEAD",
"mean": 3.5225198335200005,
"stddev": 0.15110203015856605,
"median": 3.45076254002,
"user": 1.28986392,
"system": 1.3239677799999998,
"min": 3.39340991202,
"max": 3.79636721002
},
{
"command": "pnpr@main",
"mean": 3.52509790172,
"stddev": 0.1253719706414487,
"median": 3.46610849052,
"user": 1.30255752,
"system": 1.3390671799999998,
"min": 3.41415459902,
"max": 3.76992690702
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1178537892426087,
"stddev": 0.007213337165227008,
"median": 0.11663512246,
"user": 0.1477041913043478,
"system": 0.12369138782608693,
"min": 0.10806365446,
"max": 0.13541665045999998
},
{
"command": "pacquet@main",
"mean": 0.12189088959636364,
"stddev": 0.004929364221265126,
"median": 0.12150692146,
"user": 0.15188116363636364,
"system": 0.12215303999999995,
"min": 0.11569898646000001,
"max": 0.13646291446
},
{
"command": "pnpr@HEAD",
"mean": 0.13641650682842102,
"stddev": 0.0034010020911194724,
"median": 0.13585958246,
"user": 0.16030816842105267,
"system": 0.13594509263157892,
"min": 0.13001545046,
"max": 0.14354365446
},
{
"command": "pnpr@main",
"mean": 0.13807733084888885,
"stddev": 0.00505649759336416,
"median": 0.13731983145999999,
"user": 0.1649038,
"system": 0.12864970666666664,
"min": 0.12976957946,
"max": 0.15256793246
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.12092791018,
"stddev": 0.017343963821338897,
"median": 1.11964360198,
"user": 0.50608526,
"system": 0.19342072000000002,
"min": 1.0900456004799999,
"max": 1.14781666548
},
{
"command": "pacquet@main",
"mean": 1.12275484768,
"stddev": 0.01714657602917066,
"median": 1.1232781969799999,
"user": 0.48936075999999995,
"system": 0.21331171999999995,
"min": 1.0892166104799998,
"max": 1.14741480048
}
]
} |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
pnpm now measures a workspace: path in an override from the workspace root, so an override written in a file listed under include has to be re-expressed from that root, as file: and link: values already are. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Code review by qodo was updated up to the latest commit 8213c09 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Rebased onto
Qodo's trailing-comma finding is declined. The calls close with Status on 8213c09: all checks pass. CodeRabbit reviewed this commit with no actionable comments. Qodo has no open findings beyond the declined one. Greptile's trial has ended, so it does not review. Nothing else remains within scope. Written by an agent (Claude Code, claude-opus-5-5). |
Summary
Closes #17010.
An override is written once in
pnpm-workspace.yamland applied to every project it matches.file:,link:and bare-path values are anchored at the workspace root and rendered again for each project. Aworkspace:./pathvalue was not, so it was measured from the consuming project. Without injection that produced a dangling link, and withinjectWorkspacePackages: truethe install failed with "Could not install from ... as it does not exist".Both versions had the bug, so both are fixed. The overrider now claims a
workspace:value when it starts withworkspace:., which is the onlyworkspace:shape the resolver reads as a path. It renders that value relative to each project and keeps a leading./, so the result still reaches the local resolver and keeps theworkspace:protocol (and the injection behavior that comes with it). For a manifest with no directory, such as a dependency of a non-workspace package, the value is left as declared, since an absoluteworkspace:/...would be read as a version range.In pnpm 12, an override written in a file listed under
includehas itsworkspace:path rewritten to start at the workspace root, asfile:andlink:values already are. pnpm 11 has noinclude.With the fix, an override to
workspace:./packages/targetgives the same lockfile entry as declaringworkspace:../../targetin the consumer directly, with and withoutinjectWorkspacePackages.Not covered here: when the overridden dependency belongs to a non-workspace package pulled in by a nested project, pnpm 11 resolves the declared value from the lockfile directory and works, while pnpm 12 resolves it from the importer's directory (
opts_relative_to_declaring_manifestonly redirectsfile:) and still points inside the importer. That is an existing v11/v12 difference in how a dependency'sworkspace:path is resolved, not in the overrider, so I left it out of this PR.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit
pnpm.overridesnow resolvesworkspace:paths relative to the directory containingpnpm-workspace.yaml, including for packages nested within the workspace.workspace:override paths are resolved in included configuration files.