Repository navigation
Conversation
Prune explicit workspace package exclusions before scanning Cargo and Python manifests. Preserve native discovery outside positive npm package patterns and share directory pattern normalization. Closes #14844
PR Summary by QodoHonor workspace exclusions during native manifest discovery
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughNative Cargo and Python discovery now receives workspace package patterns, prunes directories matched by negated patterns before reading manifests, reports invalid patterns, and documents the behavior. Tests cover traversal and excluded Cargo workspaces. ChangesNative discovery exclusions
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Sequence Diagram(s)sequenceDiagram
participant pnpm_install
participant EcosystemWorkspaceInventory
participant find_workspace_inventory
participant CargoDiscovery
pnpm_install->>EcosystemWorkspaceInventory: create workspace inventory
EcosystemWorkspaceInventory->>find_workspace_inventory: pass workspace package patterns
find_workspace_inventory->>CargoDiscovery: traverse non-excluded directories
CargoDiscovery-->>pnpm_install: return discovered manifests
Suggested labels: Merge Risk: ⚪ Minimal · up to The reviewed change has no identified merge-blocking risk. ✨ Finishing Touches🧪 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 |
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit aad1848 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Addressed Qodo's release-note comment in aad1848. The parsing and generated-configuration effects now have separate sentences. Written by an agent (Codex, GPT-6). |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14846 +/- ##
==========================================
- Coverage 90.80% 90.80% -0.01%
==========================================
Files 1238 1239 +1
Lines 160122 160163 +41
==========================================
+ Hits 145401 145433 +32
- Misses 14721 14730 +9 ☔ 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.35270968928,
"stddev": 0.14257923508742085,
"median": 2.3204275804799996,
"user": 1.2029118600000002,
"system": 1.29899064,
"min": 2.2108328234799997,
"max": 2.6127230304799998
},
{
"command": "pacquet@main",
"mean": 2.3473418152799996,
"stddev": 0.14769779948887896,
"median": 2.26027865998,
"user": 1.1739469599999999,
"system": 1.32809354,
"min": 2.21520667348,
"max": 2.5516135104799997
},
{
"command": "pnpr@HEAD",
"mean": 1.5069362196800005,
"stddev": 0.14498889667411474,
"median": 1.52943169498,
"user": 1.0865167599999999,
"system": 1.27359014,
"min": 1.2941611824800001,
"max": 1.6580584974800001
},
{
"command": "pnpr@main",
"mean": 1.45663774258,
"stddev": 0.1464839583638066,
"median": 1.48543677298,
"user": 1.08570006,
"system": 1.2560676400000002,
"min": 1.27759387148,
"max": 1.67376340848
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24050389474,
"stddev": 0.050403830076076545,
"median": 0.21433811834000002,
"user": 0.27195085999999996,
"system": 0.5712526800000001,
"min": 0.19575811434,
"max": 0.33827243234
},
{
"command": "pacquet@main",
"mean": 0.20884475444,
"stddev": 0.007224734322755154,
"median": 0.20935222484000005,
"user": 0.21408086,
"system": 0.53904458,
"min": 0.19881204334000002,
"max": 0.21940484234000002
},
{
"command": "pnpr@HEAD",
"mean": 0.22447464144,
"stddev": 0.005040115665489863,
"median": 0.22439986134,
"user": 0.23937706000000003,
"system": 0.51338178,
"min": 0.21423266534000002,
"max": 0.23065067834000003
},
{
"command": "pnpr@main",
"mean": 0.22419946554000006,
"stddev": 0.01046696220589597,
"median": 0.22449350134,
"user": 0.22077886000000002,
"system": 0.52884558,
"min": 0.20660425134000002,
"max": 0.24015695834000003
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0068686609549999935,
"stddev": 0.0005777802566511463,
"median": 0.00679038508,
"user": 0.004273880319148936,
"system": 0.0030254494680851058,
"min": 0.00580491108,
"max": 0.01035066808
},
{
"command": "pacquet@main",
"mean": 0.006940450381408454,
"stddev": 0.0006195817388062598,
"median": 0.006837267080000001,
"user": 0.004241008450704222,
"system": 0.0031385369014084482,
"min": 0.0056483070800000005,
"max": 0.00981111408
},
{
"command": "pnpr@HEAD",
"mean": 0.00689073745829911,
"stddev": 0.0005849478109003455,
"median": 0.00672005708,
"user": 0.004051196480938416,
"system": 0.0032332185337243433,
"min": 0.00603614208,
"max": 0.00918965908
},
{
"command": "pnpr@main",
"mean": 0.007518331593888881,
"stddev": 0.0005215988894413087,
"median": 0.00744624558,
"user": 0.004872550000000003,
"system": 0.003134388555555555,
"min": 0.00656356308,
"max": 0.01003289808
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0076278665043971626,
"stddev": 0.0006301981816531833,
"median": 0.00756403082,
"user": 0.00462404794326241,
"system": 0.003437133900709221,
"min": 0.00621319982,
"max": 0.009858721820000001
},
{
"command": "pacquet@main",
"mean": 0.007652870414674553,
"stddev": 0.0009187318475538327,
"median": 0.00747155232,
"user": 0.004874070059171598,
"system": 0.0032135017751479308,
"min": 0.00593433482,
"max": 0.010992425820000002
},
{
"command": "pnpr@HEAD",
"mean": 0.007764332619331098,
"stddev": 0.0006015366455747945,
"median": 0.0077679158199999996,
"user": 0.004710089096989963,
"system": 0.0035218313043478256,
"min": 0.00633900382,
"max": 0.00994862682
},
{
"command": "pnpr@main",
"mean": 0.007282722707272723,
"stddev": 0.0004555361423047129,
"median": 0.0072421488200000005,
"user": 0.004282563636363635,
"system": 0.0034028462545454543,
"min": 0.00636226782,
"max": 0.009392363820000001
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.47350745094,
"stddev": 0.09315619425621066,
"median": 2.44707171014,
"user": 1.70537478,
"system": 1.6621724999999998,
"min": 2.42673936664,
"max": 2.73530157564
},
{
"command": "pacquet@main",
"mean": 2.4584522164400004,
"stddev": 0.02720747854711362,
"median": 2.46126403264,
"user": 1.7458966800000002,
"system": 1.5454861,
"min": 2.42303194464,
"max": 2.51585163564
},
{
"command": "pnpr@HEAD",
"mean": 1.5179450990399999,
"stddev": 0.11263846245542479,
"median": 1.51441696964,
"user": 1.0856613800000001,
"system": 1.2643039,
"min": 1.38040387864,
"max": 1.68479214264
},
{
"command": "pnpr@main",
"mean": 1.4556466115400002,
"stddev": 0.10035981066408739,
"median": 1.4349789946399998,
"user": 1.1105937799999999,
"system": 1.2427381,
"min": 1.37875348064,
"max": 1.72060762964
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34522238118000004,
"stddev": 0.015817668894152388,
"median": 0.34325100748000004,
"user": 0.5425376999999999,
"system": 0.7814571599999999,
"min": 0.31982200648000003,
"max": 0.37941053748000003
},
{
"command": "pacquet@main",
"mean": 0.46670942568000007,
"stddev": 0.1053429637654716,
"median": 0.5116753299800001,
"user": 0.7395169,
"system": 1.0147137599999998,
"min": 0.33845065148000003,
"max": 0.58551918948
},
{
"command": "pnpr@HEAD",
"mean": 0.27344531318000004,
"stddev": 0.008158895757081442,
"median": 0.27310766648,
"user": 0.219972,
"system": 0.5181407599999999,
"min": 0.25699876348,
"max": 0.28541505448
},
{
"command": "pnpr@main",
"mean": 0.26989199728,
"stddev": 0.009429147257481672,
"median": 0.26728338448,
"user": 0.22120199999999998,
"system": 0.50952186,
"min": 0.25731710548000003,
"max": 0.28343687548
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.5284487095800003,
"stddev": 0.015239711564147527,
"median": 1.53087113168,
"user": 0.7700261399999999,
"system": 0.8382104,
"min": 1.5010816716800002,
"max": 1.5467121486800002
},
{
"command": "pacquet@main",
"mean": 1.5633955165800004,
"stddev": 0.03327247756983857,
"median": 1.56434440168,
"user": 0.83952554,
"system": 0.9134325000000001,
"min": 1.50700649268,
"max": 1.62294530568
},
{
"command": "pnpr@HEAD",
"mean": 0.27390989198,
"stddev": 0.008531498021817945,
"median": 0.27250321518000004,
"user": 0.20832204,
"system": 0.5162078,
"min": 0.26384863268000003,
"max": 0.28744265368
},
{
"command": "pnpr@main",
"mean": 0.27392310018000005,
"stddev": 0.010248412092660563,
"median": 0.27580511918,
"user": 0.22176474000000002,
"system": 0.5149893999999999,
"min": 0.25780059568,
"max": 0.28826297268
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.21831143094,
"stddev": 0.021330971085218274,
"median": 0.21368023354000001,
"user": 0.24063189999999998,
"system": 0.06805096,
"min": 0.19213828454,
"max": 0.27009028154000003
},
{
"command": "pacquet@main",
"mean": 0.20037171538615384,
"stddev": 0.01974074641099638,
"median": 0.19992783254000002,
"user": 0.20400661538461537,
"system": 0.07069868307692308,
"min": 0.17417171054,
"max": 0.24771816054
},
{
"command": "pnpr@HEAD",
"mean": 0.08991749141500001,
"stddev": 0.0026128184112808725,
"median": 0.08946131203999999,
"user": 0.03395396875,
"system": 0.01143722875,
"min": 0.08676654454,
"max": 0.09597291054
},
{
"command": "pnpr@main",
"mean": 0.08871302538375,
"stddev": 0.0022632540733888234,
"median": 0.08764212254,
"user": 0.029149843749999998,
"system": 0.01451035375,
"min": 0.08616684954,
"max": 0.09412079654
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6407889970088889,
"stddev": 0.0746798092658442,
"median": 0.66130594312,
"user": 0.6434558866666666,
"system": 0.1650308911111111,
"min": 0.53401290012,
"max": 0.75619910712
},
{
"command": "pacquet@main",
"mean": 0.6280145062311111,
"stddev": 0.09766561296699991,
"median": 0.6198894971200001,
"user": 0.640416442222222,
"system": 0.15467178,
"min": 0.53374955012,
"max": 0.7940086381200001
},
{
"command": "pnpm@HEAD",
"mean": 2.9680282858977782,
"stddev": 0.10574218924642628,
"median": 2.9576977481199997,
"user": 4.333178775555556,
"system": 0.25994133555555554,
"min": 2.83234315512,
"max": 3.12958928712
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.443187908940001,
"stddev": 0.14137922198136266,
"median": 4.41605413684,
"user": 1.43040624,
"system": 1.63106982,
"min": 4.28605284334,
"max": 4.66168926934
},
{
"command": "pacquet@main",
"mean": 4.35790170654,
"stddev": 0.14483998460137082,
"median": 4.29398612034,
"user": 1.29059644,
"system": 1.4633653199999999,
"min": 4.27522891934,
"max": 4.74551906134
},
{
"command": "pnpr@HEAD",
"mean": 3.43436341874,
"stddev": 0.07056638105906565,
"median": 3.42216721384,
"user": 1.2730223399999998,
"system": 1.3957433199999998,
"min": 3.34686112034,
"max": 3.57291638634
},
{
"command": "pnpr@main",
"mean": 3.4617127672400003,
"stddev": 0.12327845608387088,
"median": 3.42600881284,
"user": 1.27290694,
"system": 1.3352843199999997,
"min": 3.34695698734,
"max": 3.69729669234
}
]
}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.10720183930333332,
"stddev": 0.0029380178877271477,
"median": 0.10697735372,
"user": 0.133221075,
"system": 0.12515978333333333,
"min": 0.10332937772,
"max": 0.11453888272
},
{
"command": "pacquet@main",
"mean": 0.10718676676166666,
"stddev": 0.003462618018913717,
"median": 0.10624556022000001,
"user": 0.12883361666666665,
"system": 0.1310729083333333,
"min": 0.10311506572000001,
"max": 0.11528061372000001
},
{
"command": "pnpr@HEAD",
"mean": 0.11804506376545455,
"stddev": 0.0033089250529027966,
"median": 0.11817161972000001,
"user": 0.14301215454545455,
"system": 0.12397719999999998,
"min": 0.11133671372000001,
"max": 0.12679562172000003
},
{
"command": "pnpr@main",
"mean": 0.11963686398086958,
"stddev": 0.004047934203583112,
"median": 0.11953316472,
"user": 0.13425474347826089,
"system": 0.13329033043478258,
"min": 0.11173999072,
"max": 0.13130461372000002
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/14846 |
| 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) |
|---|---|---|
| gvs-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 111.34 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,380.40 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 263.85 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 257.00 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 86.77 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,294.16 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,346.86 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 214.23 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 6.34 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 6.04 ms |
Pass workspace package patterns into the shared native manifest inventory and prune directories matching explicit negations before opening them. Reuse directory-pattern normalization with npm workspace discovery. Preserve discovery outside positive npm patterns: existing Cargo installs support packages: [] and may live outside the npm package layout. Cargo workspace.exclude still controls Cargo membership; pnpm package negations provide the boundary for discovering independent native workspaces. Add an offline CLI regression for invalid and valid excluded Cargo workspaces, plus inventory coverage for Cargo/Python, normalized and glob exclusions, root inclusion, and invalid patterns. The CLI regression fails on the original implementation with the reported cargo metadata error. This affects the Rust v12 CLI only. The TypeScript v11 CLI has no Cargo or Python ecosystem install integration. Closes pnpm#14844.
Pass workspace package patterns into the shared native manifest inventory and prune directories matching explicit negations before opening them. Reuse directory-pattern normalization with npm workspace discovery. Preserve discovery outside positive npm patterns: existing Cargo installs support packages: [] and may live outside the npm package layout. Cargo workspace.exclude still controls Cargo membership; pnpm package negations provide the boundary for discovering independent native workspaces. Add an offline CLI regression for invalid and valid excluded Cargo workspaces, plus inventory coverage for Cargo/Python, normalized and glob exclusions, root inclusion, and invalid patterns. The CLI regression fails on the original implementation with the reported cargo metadata error. This affects the Rust v12 CLI only. The TypeScript v11 CLI has no Cargo or Python ecosystem install integration. Closes pnpm#14844.
Summary
Cargo and Python discovery now honor explicit
!exclusions inpnpm-workspace.yamlpackages. Excluded directories are pruned before traversal, preventing invalid fixture manifests from failing installs and independent excluded workspaces from receiving generated files.Positive npm package patterns continue to leave native discovery unrestricted, including
packages: []. The workspace root remains eligible. The discovery boundary and its relationship to Cargo membership are documented.Validation:
just ready(11,123 tests passed; 13 skipped), plus targeted Cargo and workspace tests.Closes #14844.
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 (Codex, GPT-6).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
pnpm-workspace.yaml.Documentation