Repository navigation
fix(lockfile): keep bundledDependencies and the libc shape on a reused package entry - #14154
Conversation
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? |
|
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 (4)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe resolver now preserves ChangesLockfile metadata preservation
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized lockfile-preservation change has no actionable merge-blocking risk remaining and is merge-ready after normal checks and review. Assessment against linked issues
Out-of-scope changes
Suggested labels: Suggested reviewers: ✨ 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 |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (3): Last reviewed commit: "fix(lockfile): keep a reused entry's lib..." | Re-trigger Greptile |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14154 +/- ##
=======================================
Coverage 88.62% 88.62%
=======================================
Files 679 679
Lines 114319 114328 +9
=======================================
+ Hits 101310 101323 +13
+ Misses 13009 13005 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
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.37776981048,
"stddev": 0.11048851442283898,
"median": 2.3345255265800002,
"user": 1.3736549399999998,
"system": 1.49291418,
"min": 2.26985277008,
"max": 2.60511048608
},
{
"command": "pacquet@main",
"mean": 2.3622438052800003,
"stddev": 0.0831419824476842,
"median": 2.35955017858,
"user": 1.3066313399999998,
"system": 1.41010868,
"min": 2.2470962500800002,
"max": 2.4740696470800003
},
{
"command": "pnpr@HEAD",
"mean": 1.35953891138,
"stddev": 0.09226024153457957,
"median": 1.31660886158,
"user": 1.17832524,
"system": 1.22678198,
"min": 1.2935193460799999,
"max": 1.59336471908
},
{
"command": "pnpr@main",
"mean": 1.43567579938,
"stddev": 0.12207245008073456,
"median": 1.4082110015799998,
"user": 1.31211484,
"system": 1.3664445799999998,
"min": 1.31009627208,
"max": 1.68457692808
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.29256932638,
"stddev": 0.01584921769402875,
"median": 0.28948086538000006,
"user": 0.23675998000000004,
"system": 0.50675352,
"min": 0.26851245138,
"max": 0.31878549438000003
},
{
"command": "pacquet@main",
"mean": 0.28537751318000004,
"stddev": 0.010514381302444887,
"median": 0.28259701288000005,
"user": 0.21941548000000002,
"system": 0.51711622,
"min": 0.27138620338,
"max": 0.30786757538000004
},
{
"command": "pnpr@HEAD",
"mean": 0.2751616263800001,
"stddev": 0.009933832015297295,
"median": 0.27630225188,
"user": 0.21774127999999998,
"system": 0.4587825199999999,
"min": 0.26121478638000006,
"max": 0.29638314338000005
},
{
"command": "pnpr@main",
"mean": 0.29079346588000005,
"stddev": 0.017325921966835738,
"median": 0.29126757738000003,
"user": 0.23888777999999994,
"system": 0.47308512,
"min": 0.26802838238000004,
"max": 0.32195219638000006
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.007732854235945951,
"stddev": 0.0007307823761337131,
"median": 0.00769483904,
"user": 0.004512934729729727,
"system": 0.003261195810810809,
"min": 0.0063187860400000006,
"max": 0.01054991004
},
{
"command": "pacquet@main",
"mean": 0.007826872130185677,
"stddev": 0.0006470588667585787,
"median": 0.007816983040000001,
"user": 0.004356448700265252,
"system": 0.0035017020689655162,
"min": 0.006429626040000001,
"max": 0.010350936040000001
},
{
"command": "pnpr@HEAD",
"mean": 0.008314204208674701,
"stddev": 0.0007326601718683613,
"median": 0.00821549754,
"user": 0.004451486626506025,
"system": 0.0038940499999999996,
"min": 0.00624218404,
"max": 0.01122737304
},
{
"command": "pnpr@main",
"mean": 0.007471389949348442,
"stddev": 0.0007559324452436312,
"median": 0.007328966040000001,
"user": 0.00428996668555241,
"system": 0.0032193976203966006,
"min": 0.00643589704,
"max": 0.012262588040000001
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008612499534545447,
"stddev": 0.0009810110544927022,
"median": 0.00848934508,
"user": 0.004697521660079053,
"system": 0.0039279187351778655,
"min": 0.006871905080000001,
"max": 0.01222246108
},
{
"command": "pacquet@main",
"mean": 0.008222633469438943,
"stddev": 0.0009255172715902179,
"median": 0.008047815080000001,
"user": 0.0045526500990098985,
"system": 0.003683344356435643,
"min": 0.00666757108,
"max": 0.012023025080000001
},
{
"command": "pnpr@HEAD",
"mean": 0.008497017673525181,
"stddev": 0.000792887385783188,
"median": 0.008343345080000002,
"user": 0.004592825467625897,
"system": 0.003917795827338129,
"min": 0.00700025608,
"max": 0.012816006080000001
},
{
"command": "pnpr@main",
"mean": 0.00788931666214286,
"stddev": 0.0009378271692515984,
"median": 0.00778300208,
"user": 0.004857992142857142,
"system": 0.003050996428571429,
"min": 0.00600666808,
"max": 0.01177158308
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8208546304399995,
"stddev": 0.03038993625648028,
"median": 2.8131587317399998,
"user": 1.88305832,
"system": 1.4716430199999997,
"min": 2.78432830474,
"max": 2.88691455174
},
{
"command": "pacquet@main",
"mean": 2.7803268434399997,
"stddev": 0.02871664851473919,
"median": 2.7819421377399998,
"user": 1.7616448200000001,
"system": 1.38394412,
"min": 2.73246949774,
"max": 2.82836750874
},
{
"command": "pnpr@HEAD",
"mean": 1.5381289099400002,
"stddev": 0.15297414299838874,
"median": 1.4968975742400001,
"user": 1.13768892,
"system": 1.3439716200000003,
"min": 1.38057378074,
"max": 1.76538415074
},
{
"command": "pnpr@main",
"mean": 1.5696833843400002,
"stddev": 0.11223990691895433,
"median": 1.57066216674,
"user": 1.17312512,
"system": 1.3473201199999998,
"min": 1.4153344197400002,
"max": 1.7371122277400002
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41016535986,
"stddev": 0.02308372211395936,
"median": 0.40642634836,
"user": 0.4433206399999999,
"system": 0.6201228999999999,
"min": 0.36985670536000004,
"max": 0.44318193236000003
},
{
"command": "pacquet@main",
"mean": 0.40879138275999993,
"stddev": 0.017493337230942475,
"median": 0.40594019536000003,
"user": 0.44775763999999996,
"system": 0.6370066000000001,
"min": 0.38895844436000004,
"max": 0.44662511336000005
},
{
"command": "pnpr@HEAD",
"mean": 0.33516364486,
"stddev": 0.011637955220974213,
"median": 0.33195158086,
"user": 0.21985634000000004,
"system": 0.5071144,
"min": 0.32215496436,
"max": 0.36055927136
},
{
"command": "pnpr@main",
"mean": 0.30926894456000004,
"stddev": 0.009929335014293925,
"median": 0.30862631436,
"user": 0.19435293999999997,
"system": 0.47664919999999994,
"min": 0.29517278436,
"max": 0.32506688736
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.8340852710600004,
"stddev": 0.02425509952367353,
"median": 1.8321422463600001,
"user": 0.64950226,
"system": 0.6528742000000001,
"min": 1.7978406798600002,
"max": 1.8768075298600002
},
{
"command": "pacquet@main",
"mean": 1.85106703726,
"stddev": 0.021821814885033194,
"median": 1.8519167818600002,
"user": 0.66706746,
"system": 0.6784699,
"min": 1.8235914688600001,
"max": 1.8814805458600001
},
{
"command": "pnpr@HEAD",
"mean": 0.31179621246000006,
"stddev": 0.013865572962872271,
"median": 0.30786290486,
"user": 0.21171215999999998,
"system": 0.4540826,
"min": 0.29593909586,
"max": 0.34077096286
},
{
"command": "pnpr@main",
"mean": 0.33191461296,
"stddev": 0.030965587903193398,
"median": 0.32234168136,
"user": 0.21384276,
"system": 0.5275212,
"min": 0.31575450686,
"max": 0.41912101486000003
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2197131418436364,
"stddev": 0.023409139726186926,
"median": 0.21120778148000002,
"user": 0.15736053454545454,
"system": 0.05917639272727273,
"min": 0.18242228248000003,
"max": 0.25725791848
},
{
"command": "pacquet@main",
"mean": 0.22855126671076922,
"stddev": 0.018095410869890593,
"median": 0.22363678148000002,
"user": 0.17570608000000001,
"system": 0.05278865846153846,
"min": 0.20620065148000002,
"max": 0.25156566048
},
{
"command": "pnpr@HEAD",
"mean": 0.09872267682482756,
"stddev": 0.0028244410587671435,
"median": 0.09824694248,
"user": 0.028831080000000002,
"system": 0.011987257931034483,
"min": 0.09518561948,
"max": 0.10833570248
},
{
"command": "pnpr@main",
"mean": 0.09903906615857143,
"stddev": 0.0031450544581574425,
"median": 0.09807628148,
"user": 0.028054294285714286,
"system": 0.013721262857142856,
"min": 0.09479626648,
"max": 0.10804150048
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6133241789533334,
"stddev": 0.08576463230516448,
"median": 0.63862218262,
"user": 0.5944811666666666,
"system": 0.11484736666666666,
"min": 0.47963002962000006,
"max": 0.71959257862
},
{
"command": "pacquet@main",
"mean": 0.5860244652866666,
"stddev": 0.12728236360485243,
"median": 0.55844723062,
"user": 0.546473611111111,
"system": 0.11651925555555558,
"min": 0.38287782462000003,
"max": 0.76917532462
},
{
"command": "pnpm@HEAD",
"mean": 3.0182054027311107,
"stddev": 0.03959333542656282,
"median": 3.01753895962,
"user": 4.563949833333333,
"system": 0.28043258888888883,
"min": 2.96522931862,
"max": 3.0879767816199997
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.36711169342,
"stddev": 0.12616542896262806,
"median": 4.329838758520001,
"user": 1.4553259600000001,
"system": 1.4635933199999998,
"min": 4.298318532520001,
"max": 4.72035398952
},
{
"command": "pacquet@main",
"mean": 4.428863250220001,
"stddev": 0.15182690074424454,
"median": 4.37062728602,
"user": 1.4520395599999998,
"system": 1.45145042,
"min": 4.303809402520001,
"max": 4.710272914520001
},
{
"command": "pnpr@HEAD",
"mean": 3.53588374222,
"stddev": 0.15302050665335806,
"median": 3.5564870430199997,
"user": 1.3823657599999999,
"system": 1.4539514199999997,
"min": 3.36990967152,
"max": 3.79595149852
},
{
"command": "pnpr@main",
"mean": 3.43628136542,
"stddev": 0.10954924535852721,
"median": 3.39547543802,
"user": 1.3773522599999999,
"system": 1.4229188199999996,
"min": 3.36215288152,
"max": 3.73802510452
}
]
}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.1627001101666667,
"stddev": 0.00528455359063347,
"median": 0.16454313090000003,
"user": 0.18444447999999994,
"system": 0.19077230666666667,
"min": 0.1547587619,
"max": 0.17249558590000003
},
{
"command": "pacquet@main",
"mean": 0.16403449302500006,
"stddev": 0.005474165604538138,
"median": 0.16312483090000002,
"user": 0.18858046750000004,
"system": 0.19057082750000004,
"min": 0.15649489490000001,
"max": 0.1758691679
},
{
"command": "pnpr@HEAD",
"mean": 0.1773631411857143,
"stddev": 0.005778110822706669,
"median": 0.1773875814,
"user": 0.20672278000000002,
"system": 0.1878509971428571,
"min": 0.1698228629,
"max": 0.18690786290000003
},
{
"command": "pnpr@main",
"mean": 0.1770503287666667,
"stddev": 0.0062795895035642445,
"median": 0.17454609990000003,
"user": 0.19709327999999995,
"system": 0.19429550666666667,
"min": 0.1680984329,
"max": 0.1892924649
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/14154 |
| 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 | 169.82 ms |
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,380.57 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 295.94 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 322.15 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 95.19 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,293.52 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,369.91 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 261.21 ms |
| isolated-linker.repeat-install.cold-cache.hot-store | 📈 view plot | 7.00 ms |
| isolated-linker.repeat-install.hot-cache.hot-store | 📈 view plot | 6.24 ms |
49ba38e to
3069c39
Compare
Code Review by Qodo
1. Bundled deps double-cloned
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
When the resolver reuses a locked resolution,
synthesize_manifestrebuilds the package's manifest from itspackages:entry, but it never carriedbundledDependenciesover. The lockfile writer reads that field off the synthesized manifest, so every reused entry lost it — bumping one dependency strippedbundledDependenciesfrom all 9 entries carrying it in the reproduction, none of them related to the change. Synthesizing the field back, in both its list and boolean form, makes a reused entry round-trip. The TypeScript CLI already keeps the field through the pick list inlockfile/fs/src/lockfileFormatConverters.ts, so this is Rust-only.The same function also flattened
libcthrough a&[String]helper, so an entry recorded aslibc: muslcame back aslibc: [musl]on any rewrite.StringOrListexists precisely to keep that distinction, so it now keeps the scalar form too.The
preparehalf of the report does not hold up: the TypeScript CLI drops that field too. It is absent fromLockfilePackageInfoand from the same pick list, so aprepare: truemarker is read into memory and then dropped on the next write there as well. Preserving it in the Rust CLI alone would be a divergence, so I left it out. Happy to do both stacks in a follow-up if you want the field kept.Fixes #14153
Squash Commit Body
Checklist
already linked to it solves it.
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.
Summary by CodeRabbit
Bug Fixes
bundledDependenciesmetadata when rewriting the lockfile.libcmetadata, including plain-string values.Tests
libcvalues remain unchanged.