Repository navigation
refactor(package-manager): run the fresh install as a pipeline of phases - #14746
Conversation
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe fresh-lockfile installation path now borrows ChangesFresh-lockfile installation setup
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to This refactor updates fresh-lockfile setup to borrow dependency groups and allow empty registry defaults. No concrete current-head behavior or production risk remains identified, so it is ready to merge. 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 |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14746 +/- ##
==========================================
+ Coverage 90.26% 90.30% +0.03%
==========================================
Files 795 795
Lines 152748 153301 +553
==========================================
+ Hits 137874 138431 +557
+ Misses 14874 14870 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…nning `InstallWithFreshLockfile::run` destructured forty-five fields into locals on entry. `split` separates the twenty-six the phases borrow, as one `Copy` `FreshInputs`, from the eighteen one of them consumes, as `OwnedInputs`; the body still reads the same names for now. The dependency groups are borrowed as a slice: the one caller hands a `Vec`, and the generic parameter only existed to collect it again. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…phase The first hundred lines of `InstallWithFreshLockfile::run` opened the store, resolved the registries, built the pick policy and the resolver chain, and unpacked each of those into locals. `set_up_resolvers` owns that work and returns `ResolverSetup`, which keeps `Registries`, `PickPolicy`, `StoreIndexHandles` and `ResolverChain` whole; `run` still unpacks them for now, until the phases after it read the setup directly. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
The resolve pass sat in the middle of `run` as two hundred and seventy lines reading forty-odd names. `resolve` owns it: it takes the setup and the owned inputs by mutable borrow, consumes the registries, the pnpmfile hook and the shared wanted lockfile, and returns `Resolved`. Two of the views the later phases read borrow values the phase owns — the pnpmfile's rewritten manifests, and the repaired wanted lockfile under `fix-lockfile` — so `Resolved` carries the owned values and `run` derives the views after the phase returns. Inside the phase the manifest view is a `Cow`, so the common case allocates nothing, as before. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
`build_lockfile_phase` owns the lockfile build and the filtered-repair verification, with the gate awaited before the build under `--lockfile-only` and only for a filtered repair otherwise, as before. It reads the resolve output by shared reference; the one value it consumes, the resolved publish times, is taken off that output in `run` so the two views `run` derives from it stay valid across the call. The allow-builds policy comes from the config alone, so `run` builds it before the phase when it will materialize and branches on that to finish a `--lockfile-only` install, which keeps the writer handoff in `run`. The resolver handles are still dropped where they were, before the build, so the memory they hold is released at the same point. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…by pattern `split` destructured all forty-five fields only to move them into two literals. Reading them off `self` binds nothing. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…s a phase `plan_fresh_materialization` detects the host, settles the engine name, builds the slot layout and the directory-clone cache, and computes the skip set, returning one `FreshPlan`. The initial materialization closure stays owned by `run`: the layout and the cache borrow its lockfile, so the plan borrows it rather than owning it, as the frozen plan borrows the allow-builds policy. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
`run` unpacked the setup, the resolve output, the plan and the on-disk output into locals only to forward them. It keeps each as the value it is and reads a field where a phase needs it, and the borrowed inputs come off the `FreshInputs` view the same way. The resolver handles are released at the same point as before, now as moves out of the setup's chain, so the custom fetchers the cold batch consults survive while the resolvers and the metadata cache do not. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
The importers a selected install materializes were computed inline twice in `run`: once without a skip set, for the host probe and the layout, and once over the skip set the plan produced, for the on-disk phases. `MaterializationScope` owns the first closure and `finalize` builds the second with the project anchors; the plan borrows the first closure's lockfile, so the second is a separate value. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
The registries ride inside the resolver setup until the resolve phase takes them, the persisted lockfile comes back as one value, the early-materializer finish accepts the option it is given, and the two one-use views are built at their call sites. The lockfile phase takes the resolved times before the resolve output it borrows, so `run` can take them off that output in the same call. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…dule `resolve` the function shadowed `resolve` the module in doc links, and the closure parameter in the materialization scope needed a name. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
`prepare_resolution` owns what the resolve pass reads before it runs: the manifest transforms, kept whole, the repaired wanted lockfile, the patches, the pnpmfile hooks with their loggers as one `PnpmfileHooks`, and the update reuse scopes. It runs the pnpmfile's pre-resolution hook where it ran before. `resolve_graph` still unpacks the result for now. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…e pass apart `resolve_graph` unpacked the prep into twenty names to fill two struct literals; the literals read the prep's fields directly now. The work after the pass — the release-age policy, the patch-usage check, the peer issues and the phase's output — is `collect_resolution`, which takes the prep by value and assembles `Resolved` from it. The two facts it needs from the manifest view, which borrows the prep, are gathered before the prep moves. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
… one context The on-disk phases read the install context the frozen path already builds instead of nine fields of their own, and run as three methods on their inputs: materialize, link and build, each reading the previous phase's output whole. The build consumes the inputs so the store-index writer handle is dropped inside it, where the side-effects rows are queued, as before. Related to #14562. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…x for the install The resolver setup carries the install's shape (hoisting, bin-link options, filtered isolation, repair verification, transitive optionals) and the resolution observer's settings as two records derived once, instead of seven loose fields; the partial-selection check runs once where it ran twice. The resolution prep groups the trust gate, the patches and the update reuse scopes the same way, and the pnpmfile hooks run their own pre-resolution hook. Related to #14562. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
…s options by reader build_lockfile_phase built the same options literal twice, once per branch of --lockfile-only; the branches now differ only in when the verification gate is awaited, and the build's phase timing is logged under --lockfile-only too. The options are split by what reads them: the inputs dependencies_graph_to_lockfile lifts, the filtered splice and the spec bumps, each applying itself, where the graph build ignored six fields by name. The materialization plan lays out the slots and computes the skip set as two named steps, and the lockfile-only tail reads its options in place. With these, install_with_fresh_lockfile.rs has no function over the twelve-name cap. Related to #14562. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
85cd2f1 to
8af5e24
Compare
PR Summary by QodoRefactor fresh-lockfile installs into a phased pipeline
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
The resolve phase built the effective-manifest view for the walk and run built it again for the lockfile and on-disk phases, one extra map of importer references per install whenever a transform applied, which the compatibility database does by default. run owns the declared and the transformed manifests as ManifestSlots, so the resolve phase hands back the one view every later phase reads. Related to #14562. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
Addressed Qodo's finding (the effective-manifest view built twice) in ee0b783: Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit ee0b783 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…t holds Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
Qodo's second finding (the Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit 58600a6 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…op a restating comment The save's own doc comment goes back onto persist_fresh_lockfile, from which the struct's insertion had separated it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
Both of Qodo's latest findings are addressed in 6620943: the Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit 6620943 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
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.56812354438,
"stddev": 0.18225003665095355,
"median": 2.5715494337800004,
"user": 1.7848223799999996,
"system": 1.8437322999999997,
"min": 2.35547526828,
"max": 2.86856166628
},
{
"command": "pacquet@main",
"mean": 2.4706975163800005,
"stddev": 0.11395083094413405,
"median": 2.47031629078,
"user": 1.6447484799999998,
"system": 1.6913132999999998,
"min": 2.32284198228,
"max": 2.6414936422800004
},
{
"command": "pnpr@HEAD",
"mean": 1.5204418070799997,
"stddev": 0.1637939364067396,
"median": 1.47034612078,
"user": 1.5311202800000001,
"system": 1.7868674999999996,
"min": 1.3407513812799998,
"max": 1.77385522728
},
{
"command": "pnpr@main",
"mean": 1.5600822058800001,
"stddev": 0.10262702364748959,
"median": 1.55079112028,
"user": 1.6301215800000002,
"system": 1.8539533000000001,
"min": 1.4391910742799998,
"max": 1.71814129728
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.30106465386000003,
"stddev": 0.037924206406271393,
"median": 0.30108672766000005,
"user": 0.29727338000000003,
"system": 0.6415192000000001,
"min": 0.23813231416,
"max": 0.34449785316000003
},
{
"command": "pacquet@main",
"mean": 0.31442006716000004,
"stddev": 0.052665518328126305,
"median": 0.31142582066,
"user": 0.31503518,
"system": 0.6697059999999999,
"min": 0.24342508516,
"max": 0.39225563516000006
},
{
"command": "pnpr@HEAD",
"mean": 0.32138666056000004,
"stddev": 0.06055749296858828,
"median": 0.29536695116000006,
"user": 0.31394128,
"system": 0.6542579999999999,
"min": 0.26746828416,
"max": 0.4538896511600001
},
{
"command": "pnpr@main",
"mean": 0.29758696736000007,
"stddev": 0.04131090792091049,
"median": 0.28246600116000004,
"user": 0.25843608,
"system": 0.6562851000000001,
"min": 0.26447724216,
"max": 0.38711616316
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.012811612742205884,
"stddev": 0.0033857404274820016,
"median": 0.011923803040000002,
"user": 0.006619648970588238,
"system": 0.006906568382352939,
"min": 0.00790518404,
"max": 0.02280787304
},
{
"command": "pacquet@main",
"mean": 0.012573585446593412,
"stddev": 0.0025266974128663206,
"median": 0.01246595654,
"user": 0.006706696923076923,
"system": 0.006591394945054946,
"min": 0.006778540040000001,
"max": 0.02202195904
},
{
"command": "pnpr@HEAD",
"mean": 0.011278278849523806,
"stddev": 0.002300134614209541,
"median": 0.010776190040000001,
"user": 0.00641641523809524,
"system": 0.005478712952380955,
"min": 0.007562351040000002,
"max": 0.01878649904
},
{
"command": "pnpr@main",
"mean": 0.014521000286636764,
"stddev": 0.003226695739461323,
"median": 0.01464725304,
"user": 0.007587141883408071,
"system": 0.0077090678026905815,
"min": 0.007838158040000001,
"max": 0.02530336604
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.012282670340000003,
"stddev": 0.007028073839965778,
"median": 0.009495275639999998,
"user": 0.006182713333333334,
"system": 0.0067115737777777755,
"min": 0.006808305140000001,
"max": 0.036264418140000004
},
{
"command": "pacquet@main",
"mean": 0.013208824254624506,
"stddev": 0.002788308505847464,
"median": 0.01275175414,
"user": 0.007547463794466403,
"system": 0.006416098023715414,
"min": 0.00835376514,
"max": 0.02327244414
},
{
"command": "pnpr@HEAD",
"mean": 0.011871136498585861,
"stddev": 0.0030481231571300982,
"median": 0.01151441914,
"user": 0.006617689090909088,
"system": 0.005923156767676768,
"min": 0.007583920140000001,
"max": 0.02052565114
},
{
"command": "pnpr@main",
"mean": 0.009365463246995888,
"stddev": 0.0011548995397194135,
"median": 0.00950571614,
"user": 0.005292105102880659,
"system": 0.004589784691358021,
"min": 0.006343452140000001,
"max": 0.01285816614
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6305656845399996,
"stddev": 0.07108281984842857,
"median": 2.62016943224,
"user": 2.2215699399999997,
"system": 1.8454175400000001,
"min": 2.54847315874,
"max": 2.77219260174
},
{
"command": "pacquet@main",
"mean": 2.60037910654,
"stddev": 0.02984627031438594,
"median": 2.59054540274,
"user": 2.19001054,
"system": 1.82899104,
"min": 2.56026012274,
"max": 2.64870974874
},
{
"command": "pnpr@HEAD",
"mean": 1.5954559055400002,
"stddev": 0.1416801963247515,
"median": 1.51424209724,
"user": 1.3885247399999998,
"system": 1.6484686399999997,
"min": 1.46505858474,
"max": 1.8501962167400001
},
{
"command": "pnpr@main",
"mean": 1.63930317994,
"stddev": 0.10818333462735466,
"median": 1.65092571324,
"user": 1.7316285399999998,
"system": 1.9265484400000001,
"min": 1.51577979674,
"max": 1.88790565574
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5020919054,
"stddev": 0.0436491761948459,
"median": 0.4989237418,
"user": 0.75445098,
"system": 1.02482696,
"min": 0.4431973538,
"max": 0.5676155638
},
{
"command": "pacquet@main",
"mean": 0.5021906118,
"stddev": 0.045704300345866825,
"median": 0.5009005788,
"user": 0.7635298799999999,
"system": 0.9810999600000001,
"min": 0.4422945018,
"max": 0.5640265748000001
},
{
"command": "pnpr@HEAD",
"mean": 0.38989963910000003,
"stddev": 0.0636294334192563,
"median": 0.36280462230000005,
"user": 0.30448928,
"system": 0.65851256,
"min": 0.3331459198,
"max": 0.5196362248
},
{
"command": "pnpr@main",
"mean": 0.37335760030000004,
"stddev": 0.04038619891563016,
"median": 0.36056210480000006,
"user": 0.30004457999999995,
"system": 0.62491246,
"min": 0.33253254880000005,
"max": 0.44408334880000006
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.70785445394,
"stddev": 0.03825274078531382,
"median": 1.70628688834,
"user": 1.08428268,
"system": 1.11255932,
"min": 1.64473889884,
"max": 1.75959066184
},
{
"command": "pacquet@main",
"mean": 1.71305023254,
"stddev": 0.06283555294411927,
"median": 1.7091997438400002,
"user": 1.1355759799999998,
"system": 1.14122372,
"min": 1.62197883884,
"max": 1.83740534984
},
{
"command": "pnpr@HEAD",
"mean": 0.33696301744000007,
"stddev": 0.023488013592488404,
"median": 0.32875537134000005,
"user": 0.24348078,
"system": 0.5953450199999999,
"min": 0.30748079784000004,
"max": 0.39016724584000007
},
{
"command": "pnpr@main",
"mean": 0.29470318174,
"stddev": 0.007530506807338875,
"median": 0.29290746734000006,
"user": 0.20915938,
"system": 0.53545972,
"min": 0.28537958284000003,
"max": 0.30975138684000003
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24763046061999994,
"stddev": 0.014680553915266032,
"median": 0.24863554531999998,
"user": 0.26525723999999995,
"system": 0.08994445999999998,
"min": 0.22842214782,
"max": 0.27234270782000003
},
{
"command": "pacquet@main",
"mean": 0.22591118112769232,
"stddev": 0.029505080264710208,
"median": 0.22045227582000002,
"user": 0.21788937076923073,
"system": 0.09041164461538462,
"min": 0.19713920882,
"max": 0.29092174382
},
{
"command": "pnpr@HEAD",
"mean": 0.09934288537172416,
"stddev": 0.0032304106365730325,
"median": 0.09931057182000001,
"user": 0.04017469172413793,
"system": 0.015757156551724136,
"min": 0.09476576482000001,
"max": 0.10697797682000001
},
{
"command": "pnpr@main",
"mean": 0.09891288267185187,
"stddev": 0.003326940430269319,
"median": 0.09802065182000001,
"user": 0.03861317703703703,
"system": 0.017644065185185184,
"min": 0.09415025082000002,
"max": 0.10953403082000002
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.9578130852155555,
"stddev": 0.15693236940603253,
"median": 1.0152045746599998,
"user": 0.9713206155555554,
"system": 0.23647415555555554,
"min": 0.70117929166,
"max": 1.1842500916599998
},
{
"command": "pacquet@main",
"mean": 0.85176299566,
"stddev": 0.11875644131348452,
"median": 0.80504628666,
"user": 0.8624595044444443,
"system": 0.21533526666666666,
"min": 0.73617248266,
"max": 1.0797189006599999
},
{
"command": "pnpm@HEAD",
"mean": 3.731403333548889,
"stddev": 0.33711557564216776,
"median": 3.60731357366,
"user": 5.766583282222222,
"system": 0.32859015555555554,
"min": 3.3412713106600003,
"max": 4.42124958966
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6310355159,
"stddev": 0.13730532630197675,
"median": 4.5831672088,
"user": 2.0197448,
"system": 1.9827833199999998,
"min": 4.4964236438,
"max": 4.9004281278
},
{
"command": "pacquet@main",
"mean": 4.6363709725,
"stddev": 0.17747916643231826,
"median": 4.5772201868,
"user": 1.9677941999999997,
"system": 1.9627574200000002,
"min": 4.4571213288,
"max": 4.9555107478
},
{
"command": "pnpr@HEAD",
"mean": 3.5937389908999995,
"stddev": 0.10358419410399529,
"median": 3.5972444688,
"user": 1.8236551000000003,
"system": 1.8717654199999998,
"min": 3.4495592308,
"max": 3.7747006288
},
{
"command": "pnpr@main",
"mean": 3.5624299489,
"stddev": 0.1126804589052783,
"median": 3.5253730053,
"user": 1.7295589999999996,
"system": 1.7671970199999998,
"min": 3.4140804498,
"max": 3.8230546658
}
]
}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. Comparable to that scenario head-to-head.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23130902676,
"stddev": 0.023334295867781015,
"median": 0.22816845526,
"user": 0.30232002666666663,
"system": 0.25430659333333333,
"min": 0.20640780076,
"max": 0.28928752176000005
},
{
"command": "pacquet@main",
"mean": 0.23573725439636367,
"stddev": 0.023051692779035012,
"median": 0.22907058876,
"user": 0.3085680872727273,
"system": 0.25001753272727273,
"min": 0.20985103976,
"max": 0.28413324076
},
{
"command": "pnpr@HEAD",
"mean": 0.34647151096,
"stddev": 0.12667092340044278,
"median": 0.32796142726000005,
"user": 0.39889656,
"system": 0.27422586,
"min": 0.22141100776,
"max": 0.62417975376
},
{
"command": "pnpr@main",
"mean": 0.24286996239636363,
"stddev": 0.03079283371698693,
"median": 0.24423522876,
"user": 0.3037922690909091,
"system": 0.22798544181818176,
"min": 0.18153311276,
"max": 0.29857894276
}
]
} |
|
The Bencher alert on The rows this PR can reach are flat on the same runner: fresh install cold cache + cold store 2.631 vs 2.600 s, hot cache + hot store 502.1 vs 502.2 ms, cold cache + hot store 1.708 vs 1.713 s, fresh resolve 247.6 ± 14.7 vs 225.9 ± 29.5 ms and peer-heavy resolve 957.8 ± 156.9 vs 851.8 ± 118.8 ms, the last two inside their own standard deviations. Written by an agent (Claude Code, claude-fable-5-1). |
…uded Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
|
The Written by an agent (Claude Code, claude-fable-5-1). |
|
Code review by qodo was updated up to the latest commit 8e6bb73 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…ses (pnpm#14746) Restructure InstallWithFreshLockfile::run as a pipeline of phases — set_up_resolvers, resolve_graph, build_lockfile_phase, plan_fresh_materialization, MaterializationScope, run_on_disk_phases — each returning one value the next reads whole. run bound 148 distinct names; it and every phase in install_with_fresh_lockfile.rs are under the 12-name cap. The install's inputs are split once into a Copy FreshInputs view and the owned OwnedInputs the phases consume. The resolve phase's two borrowed views come back as owned values, and run derives the views; the plan borrows the initial materialization closure run owns. The resolvers and the metadata cache are dropped where they were. The on-disk phases are three methods on their inputs reading one InstallContext. Record what is derived once as InstallShape, ObserverSettings, TrustGate, Patches and UpdateReuseScopes. Split the fresh lockfile build options by their readers (inputs, splice, bumps) and build the lockfile once under --lockfile-only and otherwise. Drop the DependencyGroupList type parameter: the one caller hands a Vec. Related to pnpm#14562.
Summary
Third installment of adopting
perfectionist::too_many_local_bindingsatmax_bindings = 12; the fresh-lockfile counterpart of #14739. Related to #14562.InstallWithFreshLockfile::runbound 148 distinct names. It is now a pipeline of phases, andinstall_with_fresh_lockfile.rshas no site over the cap left:Inside,
resolve_graphisprepare_resolution→ the resolve pass →collect_resolution, andrun_on_disk_phasesismaterialize→link→build, three methods onOnDiskInputsthat read the install context #14737 introduced instead of nine fields of their own.Things this path forced that the frozen one did not, each recorded in its commit:
fix-lockfile— soResolvedcarries the owned values andrunderives the views after the phase returns. Inside the phase the manifest view is aCow, so the common case allocates nothing, as before.runowns that closure and the plan borrows it; the closure over the skip set is a second value (MaterializationScope::finalize).--lockfile-onlyreturned early from the middle ofrun; the lockfile phase now returns the lockfile andrunbranches, which keeps the writer handoff inrun. The allow-builds policy is built from config alone, sorunbuilds it before the phase when it will materialize.drops that release the resolvers and the metadata cache before materialization stay at the same point, as moves out of the setup's chain.What the phases gained while being brought under the cap, beyond names:
InstallShape(hoisting, bin-link options, filtered isolation, repair verification, transitive optionals) andObserverSettingsreplace seven loose fields on the resolver setup; the partial-selection set comparison runs once where it ran twice.TrustGate,PatchesandUpdateReuseScopesdo the same for the resolution prep.FreshLockfileBuildOptionsmixed the fourteen fieldsdependencies_graph_to_lockfilelifts with six the graph build ignored by name (merge_wanted_lockfile: _, …). They are nowinputs,splice: FilteredSpliceandbumps: SpecBumps, each with itsapply.build_lockfile_phasebuilt the same options literal twice, once per branch of--lockfile-only; the branches now differ only in when the verification gate is awaited. Thebuild_fresh_lockfilephase timing is logged under--lockfile-onlytoo, where it was not before.Also drops the
DependencyGroupListtype parameter: the one caller hands aVec.No user-visible behavior changes; no changeset. Nothing is cloned or allocated that was not before; every new struct is borrows,
Copyscalars, or a move of a value the phase already owned. The submodules underinstall_with_fresh_lockfile/(resolver_setup.rs44,resolve.rs38 and 25,manifest_transforms.rs25) are the next PR.Squash Commit Body
Checklist
already linked to it solves it.
Written by an agent (Claude Code, claude-fable-5-1).
🤖 Generated with Claude Code
https://claude.ai/code/session_019kR4Ev797PFQ6iaC3AtzRw
Summary by CodeRabbit