Repository navigation
fix(dlx): drop the caller project's patches from the cache install - #13734
Conversation
The dlx cache install inherits the invoking project's config, including `patchedDependencies`, but its workspace root is anchored to the throwaway prepare dir. Patch paths resolve against that root, so a caller with patches sent the install looking for them under the dlx cache dir and every `pnpm dlx` / `pnpm create` from such a project died with "Failed to read patch file <cache dir>/... (os error 2)". This repo is one such project: `pn compile-only` runs `pnx`, so TS CI and the integrated benchmark both go red as soon as an affected release is pinned. pnpm installs the dlx package unpatched (verified against the TypeScript CLI: the dlx cache lockfile records no `patchedDependencies`), so the throwaway install drops them rather than rebasing the paths onto the caller's workspace — the same treatment `overrides`, `catalogs`, and `packageExtensions` already get in the global and self-update installs. Regression test: a dlx run from a project that patches the dlx package itself must run the unpatched bin. It fails without the fix, on the exact missing-patch-file error.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
Changesdlx patch isolation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix dlx cache installs by ignoring caller patchedDependencies
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "test(dlx): compile the patch-isolation t..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.changeset/dlx-ignores-caller-patches.md (1)
5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the release note user-facing.
Remove the cache-install and path-resolution diagnosis. State the observed fix and the searchable error only.
Proposed release note
-`pnpm dlx` and `pnpm create` work again in a project that has `patchedDependencies`. The caller's patches were carried into the throwaway cache install, whose patch paths no longer resolve, so every invocation failed with "Failed to read patch file". The cache install now ignores them, as pnpm does. +`pnpm dlx` and `pnpm create` no longer fail with "Failed to read patch file" in projects that use `patchedDependencies`.As per path instructions, “The changeset is release-note text for users, not implementation rationale.” Based on learnings, changesets should describe user-visible behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.changeset/dlx-ignores-caller-patches.md at line 5, Update the changeset release note to describe only the user-visible fix: pnpm dlx and pnpm create now work in projects with patchedDependencies, and include the searchable error “Failed to read patch file.” Remove the cache-install, patch-path, and implementation diagnosis.Sources: Path instructions, Learnings
pnpm/crates/cli/tests/suite/dlx.rs (1)
110-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the test visible on non-Unix targets.
If this fixture can run on non-Unix targets, replace
#[cfg(unix)]with#[cfg_attr(not(unix), ignore = "...")]. The current attribute removes the test from compilation and from test reports on those targets.As per path instructions, “a Unix-only test should preferably compile everywhere and use an explicit non-Unix ignore when possible.”
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pnpm/crates/cli/tests/suite/dlx.rs` around lines 110 - 112, Update the test attribute above dlx_ignores_the_caller_projects_patched_dependencies so the test remains compiled and reported on non-Unix targets, using a conditional ignore there instead of conditionally compiling it only on Unix. Preserve normal execution on Unix and provide an explicit ignore reason for non-Unix platforms.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/dlx-ignores-caller-patches.md:
- Around line 1-3: Update the changeset metadata to include the TypeScript CLI
package alongside pacquet, using its exact package name (pnpm) and retaining the
patch release level for both packages.
---
Nitpick comments:
In @.changeset/dlx-ignores-caller-patches.md:
- Line 5: Update the changeset release note to describe only the user-visible
fix: pnpm dlx and pnpm create now work in projects with patchedDependencies, and
include the searchable error “Failed to read patch file.” Remove the
cache-install, patch-path, and implementation diagnosis.
In `@pnpm/crates/cli/tests/suite/dlx.rs`:
- Around line 110-112: Update the test attribute above
dlx_ignores_the_caller_projects_patched_dependencies so the test remains
compiled and reported on non-Unix targets, using a conditional ignore there
instead of conditionally compiling it only on Unix. Preserve normal execution on
Unix and provide an explicit ignore reason for non-Unix platforms.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f83baedf-6b38-4ba7-9dab-61801241afa3
📒 Files selected for processing (3)
.changeset/dlx-ignores-caller-patches.mdpnpm/crates/cli/src/cli_args/dlx.rspnpm/crates/cli/tests/suite/dlx.rs
Code Review by Qodo
1. Ignored dlx test lacks issue
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13734 +/- ##
==========================================
- Coverage 88.23% 88.23% -0.01%
==========================================
Files 616 616
Lines 100167 100307 +140
==========================================
+ Hits 88380 88503 +123
- Misses 11787 11804 +17 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5715812666,
"stddev": 0.13996572489414597,
"median": 2.6061043741,
"user": 1.59661256,
"system": 1.35792026,
"min": 2.3747351841,
"max": 2.7512086491,
"times": [
2.3773052431000004,
2.6173823171,
2.3747351841,
2.6511126721000005,
2.5948264311,
2.4340116041,
2.5211259561,
2.7512086491,
2.7501355211000003,
2.6439690881
]
},
{
"command": "pacquet@main",
"mean": 2.5490350196000002,
"stddev": 0.17415309534660797,
"median": 2.5207304576,
"user": 1.63782676,
"system": 1.34025886,
"min": 2.3601703041,
"max": 2.7583968461,
"times": [
2.7465161611,
2.7583968461,
2.7567899971000003,
2.3841719071000003,
2.5179844021,
2.3601703041,
2.5234765131000003,
2.6944594681000003,
2.3638223871000004,
2.3845622101000004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5353494816,
"stddev": 0.16127853520068622,
"median": 1.4941705111,
"user": 1.11405676,
"system": 1.15394606,
"min": 1.3483376271,
"max": 1.8066699781,
"times": [
1.4275820491,
1.4983785481,
1.7332114671,
1.6821850311,
1.4899624741,
1.3483376271,
1.5985605461,
1.3924450120999998,
1.8066699781,
1.3761620830999999
]
},
{
"command": "pnpr@main",
"mean": 1.5898964480999997,
"stddev": 0.1769487991225974,
"median": 1.6308472686,
"user": 1.0964661599999999,
"system": 1.20596336,
"min": 1.3777965951,
"max": 1.8225328211,
"times": [
1.3777965951,
1.6946301841,
1.4123944281,
1.3934960161,
1.5940663731,
1.6676281641,
1.4091251741,
1.8225328211,
1.7991860291000001,
1.7281086960999998
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27297990884000006,
"stddev": 0.005059415348042557,
"median": 0.27159350254000003,
"user": 0.23716338,
"system": 0.551784,
"min": 0.26591199604000004,
"max": 0.28056454004000003,
"times": [
0.27680871304000004,
0.27231882604,
0.27014534204,
0.28056454004000003,
0.27981720504,
0.26951766204000005,
0.26777978604,
0.27086817904000005,
0.26591199604000004,
0.27606683904
]
},
{
"command": "pacquet@main",
"mean": 0.27458946934,
"stddev": 0.007127322343252454,
"median": 0.27614318154000006,
"user": 0.22967768000000005,
"system": 0.5443051000000001,
"min": 0.26104838704000005,
"max": 0.28298027004000004,
"times": [
0.26967633004,
0.26104838704000005,
0.27936180104,
0.27230205404,
0.28257129104,
0.28298027004000004,
0.27771874204,
0.27456762104000004,
0.26685033904000005,
0.27881785804000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28337735704000006,
"stddev": 0.005700410819780703,
"median": 0.28332002304000004,
"user": 0.22199987999999998,
"system": 0.5658045,
"min": 0.27463860504000004,
"max": 0.29219244104000003,
"times": [
0.29219244104000003,
0.28054193704,
0.28603407804000003,
0.27463860504000004,
0.28662184304000005,
0.28504233504000004,
0.29060398604000004,
0.27724541404,
0.27925522004000003,
0.28159771104000003
]
},
{
"command": "pnpr@main",
"mean": 0.28144369454,
"stddev": 0.004268732572370038,
"median": 0.28144471454000003,
"user": 0.23648617999999993,
"system": 0.5465639,
"min": 0.27510869804000004,
"max": 0.28774683704000004,
"times": [
0.28201525704,
0.28529841604000006,
0.28389806504000004,
0.28774683704000004,
0.28568652504000003,
0.27583073504000005,
0.27510869804000004,
0.27826584104,
0.28087417204000004,
0.27971239904000006
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6157681708200005,
"stddev": 0.009976433913101742,
"median": 2.6185523922200002,
"user": 1.59579468,
"system": 1.37388584,
"min": 2.59808030272,
"max": 2.62581519072,
"times": [
2.62453765972,
2.62581519072,
2.6010242157200003,
2.6206517177200004,
2.62473953872,
2.61645306672,
2.59808030272,
2.61124211572,
2.6228555997200003,
2.6122823007200004
]
},
{
"command": "pacquet@main",
"mean": 2.62267696842,
"stddev": 0.015133527206052745,
"median": 2.61922630422,
"user": 1.61310008,
"system": 1.34834124,
"min": 2.6037111047200003,
"max": 2.65506212972,
"times": [
2.62214211772,
2.6077858117200003,
2.6248308107200002,
2.6037111047200003,
2.64093745672,
2.61810981072,
2.6171340667200003,
2.6203427977200002,
2.65506212972,
2.61671357772
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6534302521199997,
"stddev": 0.15948191299373576,
"median": 1.6909559567199999,
"user": 1.07834588,
"system": 1.18394864,
"min": 1.43240320172,
"max": 1.86703217672,
"times": [
1.43240320172,
1.86703217672,
1.50922779572,
1.84343293172,
1.67842756472,
1.70348434872,
1.56540423872,
1.43922632372,
1.78624206272,
1.70942187672
]
},
{
"command": "pnpr@main",
"mean": 1.5533323059200002,
"stddev": 0.11904174385761504,
"median": 1.5224256662200002,
"user": 1.0927518800000002,
"system": 1.19057244,
"min": 1.4358991217200001,
"max": 1.8329531887200001,
"times": [
1.51048378672,
1.8329531887200001,
1.47206384972,
1.64490318772,
1.54842580372,
1.61331207372,
1.4358991217200001,
1.49300052272,
1.5343675457200001,
1.44791397872
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.43847192463999995,
"stddev": 0.021041646881605498,
"median": 0.43547407334,
"user": 0.56968812,
"system": 0.70491634,
"min": 0.39860477384,
"max": 0.46526032984,
"times": [
0.43940298484,
0.42906276384,
0.42342936884,
0.43596967284,
0.46526032984,
0.43048752584,
0.46435872384,
0.46316462884,
0.39860477384,
0.43497847384
]
},
{
"command": "pacquet@main",
"mean": 0.41587621044,
"stddev": 0.009087514231583068,
"median": 0.41763554884,
"user": 0.5504668199999999,
"system": 0.6822510399999999,
"min": 0.39458195484,
"max": 0.42765037384,
"times": [
0.42111754784,
0.40966313284,
0.41844907284,
0.41682202484,
0.42287153284,
0.42765037384,
0.41986750884,
0.41539638684,
0.39458195484,
0.41234256884
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31711956114,
"stddev": 0.00584858337763965,
"median": 0.31876937334,
"user": 0.20542872,
"system": 0.5746442399999999,
"min": 0.30539719583999997,
"max": 0.32334395884,
"times": [
0.30539719583999997,
0.31911303884,
0.31842570784,
0.31067368984,
0.32150801884,
0.32278350684,
0.32102130584,
0.31584426684,
0.32334395884,
0.31308492184
]
},
{
"command": "pnpr@main",
"mean": 0.31365386564,
"stddev": 0.006056750978107377,
"median": 0.31369966234,
"user": 0.20865352,
"system": 0.5542253399999998,
"min": 0.30461388384,
"max": 0.32211431984,
"times": [
0.30647486084,
0.30987479884,
0.31550165384,
0.32207776884,
0.31776117884,
0.31027237584,
0.32211431984,
0.31595014484,
0.30461388384,
0.31189767084
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.74379723254,
"stddev": 0.00920284631693448,
"median": 1.7421370502400002,
"user": 0.80737686,
"system": 0.7839319599999999,
"min": 1.72968615224,
"max": 1.7614027222400002,
"times": [
1.75382616524,
1.73870062224,
1.75016747024,
1.73548324624,
1.72968615224,
1.7425957622400001,
1.74048907324,
1.7614027222400002,
1.7439427732400001,
1.74167833824
]
},
{
"command": "pacquet@main",
"mean": 1.7386793459400003,
"stddev": 0.00554131101220384,
"median": 1.73844148424,
"user": 0.77337346,
"system": 0.79609546,
"min": 1.7256367722400001,
"max": 1.74556144224,
"times": [
1.73783003624,
1.74556144224,
1.73938683924,
1.73676586624,
1.7374067102400002,
1.7256367722400001,
1.7425719752400002,
1.74475084924,
1.73879604024,
1.73808692824
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30781840774,
"stddev": 0.011858078942027516,
"median": 0.31033693224000003,
"user": 0.20616876,
"system": 0.5390896599999999,
"min": 0.28156005124,
"max": 0.31903986224,
"times": [
0.30657467724000004,
0.29687944824,
0.30310111024,
0.30595528424,
0.28156005124,
0.31783366524,
0.31409918724,
0.31903986224,
0.31883137024,
0.31430942124
]
},
{
"command": "pnpr@main",
"mean": 0.31252372264,
"stddev": 0.00785634996450915,
"median": 0.30916367274,
"user": 0.21148225999999998,
"system": 0.5405576599999999,
"min": 0.30417525824,
"max": 0.32672356024,
"times": [
0.32298308124,
0.30592134924000003,
0.30786790824,
0.30856818424,
0.30975916124,
0.31300844824,
0.31964499824000003,
0.30417525824,
0.30658527724,
0.32672356024
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.22990005110909092,
"stddev": 0.015239321260067738,
"median": 0.2315248712,
"user": 0.17440101090909094,
"system": 0.07113895454545455,
"min": 0.20315632320000002,
"max": 0.24746581720000002,
"times": [
0.2465791712,
0.22944928120000002,
0.23793807420000002,
0.24511476820000003,
0.20315632320000002,
0.21915834320000002,
0.2315248712,
0.24746581720000002,
0.21421743920000003,
0.2140147162,
0.2402817572
]
},
{
"command": "pacquet@main",
"mean": 0.22921805586666666,
"stddev": 0.014491436849865539,
"median": 0.2257207242,
"user": 0.17577283666666665,
"system": 0.07260658333333332,
"min": 0.2121048782,
"max": 0.2545387982,
"times": [
0.24499263920000003,
0.2197855222,
0.22638426120000002,
0.2545387982,
0.2525277992,
0.2250571872,
0.2121048782,
0.22940239320000003,
0.2329288102,
0.2226289952,
0.21234822620000002,
0.21791716020000002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08931634887741934,
"stddev": 0.0023586370473175737,
"median": 0.0895697542,
"user": 0.021645500645161287,
"system": 0.009678145161290322,
"min": 0.0854759212,
"max": 0.09438448220000001,
"times": [
0.0900373222,
0.0898510032,
0.0854759212,
0.0909503482,
0.0916218912,
0.09253819220000001,
0.0901974242,
0.0883211282,
0.08914438520000001,
0.0910869162,
0.0921061402,
0.0900488742,
0.0874487292,
0.0856633742,
0.08645407020000001,
0.0879689862,
0.08585327020000001,
0.0876048522,
0.0878391122,
0.0871781702,
0.0867816052,
0.09029773220000001,
0.09438448220000001,
0.0895697542,
0.09366564120000001,
0.0902670752,
0.09057119520000001,
0.08745017220000001,
0.0869166682,
0.0894741752,
0.0920382032
]
},
{
"command": "pnpr@main",
"mean": 0.08772643741875003,
"stddev": 0.001641661253856252,
"median": 0.08740493120000001,
"user": 0.02064651375,
"system": 0.010588140624999997,
"min": 0.0843360402,
"max": 0.0915360702,
"times": [
0.0889849362,
0.0873088962,
0.0862866552,
0.0895319532,
0.0874588282,
0.08728867720000001,
0.0870826712,
0.0915360702,
0.0871243782,
0.0861547472,
0.0904233282,
0.09093799620000001,
0.08590244220000001,
0.08769756620000001,
0.08743890920000001,
0.08530655320000001,
0.08788241220000001,
0.08796833620000001,
0.0866991592,
0.08576054720000001,
0.0871704662,
0.0887361282,
0.0875939812,
0.0873709532,
0.08679522020000001,
0.0890546972,
0.0905227542,
0.0843360402,
0.0878024532,
0.08701545520000001,
0.0869287202,
0.08914406520000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8625472396311112,
"stddev": 0.1471975065458572,
"median": 0.84504262352,
"user": 0.8086948111111112,
"system": 0.1536582377777778,
"min": 0.64715526952,
"max": 1.0978385185200001,
"times": [
0.64715526952,
0.8098186725200001,
0.8512237475200001,
0.78906804852,
0.75676186952,
1.08967310452,
0.87634330252,
0.84504262352,
1.0978385185200001
]
},
{
"command": "pacquet@main",
"mean": 0.75406291052,
"stddev": 0.10787573215028491,
"median": 0.81123971252,
"user": 0.6905758111111111,
"system": 0.1424405711111111,
"min": 0.60831823852,
"max": 0.8849636615200001,
"times": [
0.81271155752,
0.6158412655200001,
0.8849636615200001,
0.69231379952,
0.81123971252,
0.60831823852,
0.66646357452,
0.84485154352,
0.84986284152
]
},
{
"command": "pnpm@HEAD",
"mean": 3.0039753436311107,
"stddev": 0.06005075493627613,
"median": 2.99772671552,
"user": 4.594391144444445,
"system": 0.26136590444444446,
"min": 2.93804832952,
"max": 3.1447693225199997,
"times": [
3.1447693225199997,
2.93804832952,
3.01701354852,
2.99190688952,
2.99772671552,
2.96364204452,
3.0234361175199997,
3.00341506452,
2.95582006052
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.524817623140001,
"stddev": 0.12860871131766782,
"median": 4.46090935564,
"user": 1.81215108,
"system": 1.4201904,
"min": 4.42095335564,
"max": 4.78986399664,
"times": [
4.45897759064,
4.43827609864,
4.43945699764,
4.48201622464,
4.78986399664,
4.42095335564,
4.65706501864,
4.65969490164,
4.46284112064,
4.43903092664
]
},
{
"command": "pacquet@main",
"mean": 4.618477379939999,
"stddev": 0.15464868220152805,
"median": 4.6089823256399995,
"user": 1.8358972799999997,
"system": 1.4184547,
"min": 4.46971703064,
"max": 4.91600249664,
"times": [
4.59768996964,
4.46971703064,
4.47173614664,
4.50217783364,
4.63718859664,
4.47421687764,
4.62027468164,
4.91600249664,
4.66289312064,
4.83287704564
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5728994489400003,
"stddev": 0.11481678239686494,
"median": 3.52994034314,
"user": 1.23638148,
"system": 1.3086995999999997,
"min": 3.47841738964,
"max": 3.80785771764,
"times": [
3.47841738964,
3.49684305664,
3.56885661464,
3.58754744864,
3.53835670964,
3.49075203964,
3.48982579864,
3.74901373764,
3.52152397664,
3.80785771764
]
},
{
"command": "pnpr@main",
"mean": 3.54991223714,
"stddev": 0.08079482143263356,
"median": 3.56291221464,
"user": 1.25299678,
"system": 1.2481659999999999,
"min": 3.45357056764,
"max": 3.67873609064,
"times": [
3.47820527164,
3.55881088764,
3.46971357364,
3.5670135416399997,
3.5758532126400002,
3.46231265564,
3.45357056764,
3.64412244464,
3.67873609064,
3.61078412564
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13734 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,432.40 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 281.56 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 305.40 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.48 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,348.34 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,478.42 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 274.64 ms |
Review follow-ups: the regression test has nothing platform-specific in it, so it is gated with a runtime `ignore` rather than `cfg(unix)` (per CODE_STYLE_GUIDE), which also makes the `assert_cmd` prelude used on every target. Trim the test doc comment and the changeset to the parts that are not already stated by the test body.
|
Code review by qodo was updated up to the latest commit e915fd5 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
pnpm dlx(andpnpm create, which routes through it) fails in any project thatuses
patchedDependencies:The dlx cache install runs with the invoking project's already-loaded config,
which carries
patchedDependencies, while its workspace root is anchored to thethrowaway prepare dir. Patch paths are resolved against the workspace root
(
Config::resolved_patched_dependencies), so they end up pointing inside the dlxcache dir, where nothing exists.
pnpm installs the dlx package unpatched — I verified this against the TypeScript
CLI: a
pnpm dlx --package=fs-extra …run from this repo (which patches[email protected]) produces a dlx cache lockfile with nopatchedDependenciesand an unpatched
graceful-fs. So the cache install now drops the caller'spatches instead of rebasing the paths onto the caller's workspace — the same
treatment
overrides,catalogs, andpackageExtensionsalready get in theglobal (
cli_args::global) and self-update (self_update::install_pnpm)installs.
patchedDependenciesis the only remainingworkspace_dir-relativeconfig field, so no other setting needs the same handling.
This is also why CI is red on #13675: this repo patches
graceful-fs,and
pn compile-onlyshells out topnx, so bothTS CI / Compile & Lintandthe integrated benchmark fail there as soon as an affected release is pinned as
packageManager.TypeScript CLI: no change needed — it already installs dlx packages unpatched
(verified by running the bundle, as described above).
Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.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[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpm dlxandpnpm createso temporary installations are not affected bypatchedDependenciesconfigured in the calling project.Tests
dlxexecution results.