Repository navigation
feat(pacquet-cli): add fetch command - #12588
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a new Changesfetch subcommand
Possibly related PRs
Suggested reviewers
🎯 2 (Simple) | ⏱️ ~10 minutes ✨ 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 |
PR Summary by Qodofeat(pacquet-cli): add fetch command and metadata cache subcommands Description
Diagram
High-Level Assessment
Files changed (7)
|
Code Review by Qodo
Context used✅ Tickets:
🎫 Rust Roadmap 1. Workspace lockfile path mismatch
|
d446c9c to
612528c
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@pacquet/crates/cli/src/cli_args/cache.rs`:
- Around line 113-124: Instead of silently ignoring removal failures with `let
_` on the fs::remove_file calls within the meta_files loop, properly handle and
propagate errors according to the code style guide. When removing files at
file_path and the related meta files in the alternate meta directories, capture
the Result from each fs::remove_file call and either return the error or collect
failures to report alongside successes, so that the deletion status accurately
reflects whether the operations succeeded or failed rather than unconditionally
reporting entries as deleted.
- Around line 180-185: The contains_key method call on the store_index is using
unwrap_or(false) which silently converts any error into a false result,
effectively masking store access failures as cache misses instead of propagating
them. Remove the unwrap_or(false) and replace it with proper error handling
using either the ? operator to propagate the error, or by explicitly handling
the Result according to pacquet's error diagnostics patterns, ensuring that
operational errors from store-index operations are not silently suppressed.
In `@pacquet/crates/cli/tests/cache.rs`:
- Around line 6-83: The test file currently contains only cache-related
integration tests (should_list_registries, should_list_packages,
should_delete_packages) but lacks coverage for the newly introduced fetch
command functionality. Add new integration test functions that exercise the
fetch command end-to-end, including cases for lockfile-required behavior and
dependency-group filtering with --prod and --dev flags. These tests should
interact with CliCommand::Fetch to ensure the fetch functionality is properly
regression tested alongside the existing cache tests.
🪄 Autofix (Beta)
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: 9a9a0fcb-cfbc-469f-b2c6-26c59da932a1
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (7)
pacquet/crates/cli/Cargo.tomlpacquet/crates/cli/src/cli_args.rspacquet/crates/cli/src/cli_args/cache.rspacquet/crates/cli/src/cli_args/fetch.rspacquet/crates/cli/tests/cache.rspacquet/crates/resolving-npm-resolver/src/lib.rspacquet/crates/resolving-npm-resolver/src/mirror.rs
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 3
🤖 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 `@pacquet/crates/cli/src/cli_args/cache.rs`:
- Around line 113-124: Instead of silently ignoring removal failures with `let
_` on the fs::remove_file calls within the meta_files loop, properly handle and
propagate errors according to the code style guide. When removing files at
file_path and the related meta files in the alternate meta directories, capture
the Result from each fs::remove_file call and either return the error or collect
failures to report alongside successes, so that the deletion status accurately
reflects whether the operations succeeded or failed rather than unconditionally
reporting entries as deleted.
- Around line 180-185: The contains_key method call on the store_index is using
unwrap_or(false) which silently converts any error into a false result,
effectively masking store access failures as cache misses instead of propagating
them. Remove the unwrap_or(false) and replace it with proper error handling
using either the ? operator to propagate the error, or by explicitly handling
the Result according to pacquet's error diagnostics patterns, ensuring that
operational errors from store-index operations are not silently suppressed.
In `@pacquet/crates/cli/tests/cache.rs`:
- Around line 6-83: The test file currently contains only cache-related
integration tests (should_list_registries, should_list_packages,
should_delete_packages) but lacks coverage for the newly introduced fetch
command functionality. Add new integration test functions that exercise the
fetch command end-to-end, including cases for lockfile-required behavior and
dependency-group filtering with --prod and --dev flags. These tests should
interact with CliCommand::Fetch to ensure the fetch functionality is properly
regression tested alongside the existing cache tests.
🪄 Autofix (Beta)
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: 9a9a0fcb-cfbc-469f-b2c6-26c59da932a1
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock,!Cargo.lock
📒 Files selected for processing (7)
pacquet/crates/cli/Cargo.tomlpacquet/crates/cli/src/cli_args.rspacquet/crates/cli/src/cli_args/cache.rspacquet/crates/cli/src/cli_args/fetch.rspacquet/crates/cli/tests/cache.rspacquet/crates/resolving-npm-resolver/src/lib.rspacquet/crates/resolving-npm-resolver/src/mirror.rs
🛑 Comments failed to post (3)
pacquet/crates/cli/src/cli_args/cache.rs (2)
113-124:
⚠️ Potential issue | 🟠 Major | ⚡ Quick winPropagate deletion failures instead of reporting success.
Line 115 and Lines 122-123 ignore
remove_fileerrors, but Lines 128-130 still print those entries as deleted. That can silently misreport failed deletes.💡 Suggested fix
for meta_file in &meta_files { let file_path = cache_dir.join(meta_file); - let _ = fs::remove_file(&file_path); + if let Err(error) = fs::remove_file(&file_path) { + if error.kind() != std::io::ErrorKind::NotFound { + return Err(error).into_diagnostic(); + } + } if let Ok(rel_path) = file_path.strip_prefix(&cache_dir) { for meta_dir in [ABBREVIATED_META_DIR, FULL_META_DIR, FULL_FILTERED_META_DIR] { if meta_dir != selected_meta_dir { - let _ = - fs::remove_file(config.cache_dir.join(meta_dir).join(rel_path)); + let alt_path = config.cache_dir.join(meta_dir).join(rel_path); + if let Err(error) = fs::remove_file(&alt_path) { + if error.kind() != std::io::ErrorKind::NotFound { + return Err(error).into_diagnostic(); + } + } } } } }As per coding guidelines, pacquet/CODE_STYLE_GUIDE.md requires propagating errors in new fetch/cache code paths rather than swallowing them.
Also applies to: 128-130
🤖 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 `@pacquet/crates/cli/src/cli_args/cache.rs` around lines 113 - 124, Instead of silently ignoring removal failures with `let _` on the fs::remove_file calls within the meta_files loop, properly handle and propagate errors according to the code style guide. When removing files at file_path and the related meta files in the alternate meta directories, capture the Result from each fs::remove_file call and either return the error or collect failures to report alongside successes, so that the deletion status accurately reflects whether the operations succeeded or failed rather than unconditionally reporting entries as deleted.Source: Coding guidelines
180-185:
⚠️ Potential issue | 🟠 Major | ⚡ Quick winDo not downgrade store-index read errors to cache misses.
Line 184 uses
unwrap_or(false), so anycontains_keyerror is silently reported as “not cached”, which can misclassify versions.💡 Suggested fix
- if store_index.contains_key(&key).unwrap_or(false) { + if store_index.contains_key(&key).into_diagnostic()? { cached_versions.push(version.clone()); } else { non_cached_versions.push(version.clone()); }As per coding guidelines, pacquet/CODE_STYLE_GUIDE.md asks fetch/cache paths to propagate operational errors via existing diagnostics instead of masking them.
🤖 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 `@pacquet/crates/cli/src/cli_args/cache.rs` around lines 180 - 185, The contains_key method call on the store_index is using unwrap_or(false) which silently converts any error into a false result, effectively masking store access failures as cache misses instead of propagating them. Remove the unwrap_or(false) and replace it with proper error handling using either the ? operator to propagate the error, or by explicitly handling the Result according to pacquet's error diagnostics patterns, ensuring that operational errors from store-index operations are not silently suppressed.Source: Coding guidelines
pacquet/crates/cli/tests/cache.rs (1)
6-83:
⚠️ Potential issue | 🟠 Major | ⚡ Quick winAdd fetch regression coverage (or explicitly prove existing coverage executes fetch).
The newly introduced
fetchcommand path is not covered by the added tests (these are cache-only). Please add fetch-focused integration cases for lockfile-required behavior and--prod/--devdependency-group filtering, or link existing tests that hitCliCommand::Fetchend-to-end.As per coding guidelines,
REVIEW_GUIDE.mdrequires meaningful fetch regression coverage and says not to accept “no new tests” unless the current suite demonstrably exercises fetch.🤖 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 `@pacquet/crates/cli/tests/cache.rs` around lines 6 - 83, The test file currently contains only cache-related integration tests (should_list_registries, should_list_packages, should_delete_packages) but lacks coverage for the newly introduced fetch command functionality. Add new integration test functions that exercise the fetch command end-to-end, including cases for lockfile-required behavior and dependency-group filtering with --prod and --dev flags. These tests should interact with CliCommand::Fetch to ensure the fetch functionality is properly regression tested alongside the existing cache tests.Source: Coding guidelines
|
Code review by qodo was updated up to the latest commit 612528c |
1 similar comment
|
Code review by qodo was updated up to the latest commit 612528c |
612528c to
82b58ac
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@pacquet/crates/cli/tests/fetch.rs`:
- Around line 25-30: The fetch tests in the file are currently checking only
exit status and do not validate the documented contract of the fetch command.
Enhance the test around the "fetch without lockfile" assertion to verify that
the error output specifically contains a lockfile-related failure message (not
just that the command fails). Additionally, add separate test cases that verify
fetch command semantics: one testing that `fetch --prod` only fetches production
dependencies but still includes optional dependencies, and another testing that
`fetch --dev` only fetches development dependencies but still includes optional
dependencies. Use assertions on the command output or side effects to prove the
concrete filtering behavior, rather than just validating exit status.
🪄 Autofix (Beta)
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: ff01518b-3706-4adf-9bfb-a7089b216313
📒 Files selected for processing (3)
pacquet/crates/cli/src/cli_args.rspacquet/crates/cli/src/cli_args/fetch.rspacquet/crates/cli/tests/fetch.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- pacquet/crates/cli/src/cli_args/fetch.rs
|
Code review by qodo was updated up to the latest commit 82b58ac |
1 similar comment
|
Code review by qodo was updated up to the latest commit 82b58ac |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12588 +/- ##
==========================================
+ Coverage 88.58% 88.69% +0.10%
==========================================
Files 339 341 +2
Lines 49171 50136 +965
==========================================
+ Hits 43557 44466 +909
- Misses 5614 5670 +56 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. Bencher consumes pacquet@HEAD and pnpr@HEAD. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.809586855040001,
"stddev": 0.19928838440900631,
"median": 4.7280736364400004,
"user": 3.87212714,
"system": 3.5521377999999997,
"min": 4.65968833894,
"max": 5.25045009294,
"times": [
5.25045009294,
4.66160810294,
4.70980294094,
4.89846977594,
5.0439370419400005,
4.665017449940001,
4.7463443319400005,
4.66524654194,
4.7953039329400005,
4.65968833894
]
},
{
"command": "pacquet@main",
"mean": 4.65601282904,
"stddev": 0.1405541516865656,
"median": 4.61295684844,
"user": 3.8077876399999995,
"system": 3.5370571999999996,
"min": 4.49152510594,
"max": 4.92769579294,
"times": [
4.59594458494,
4.87405907694,
4.92769579294,
4.6334932789400005,
4.59631764194,
4.68916193794,
4.526017173940001,
4.61418316694,
4.49152510594,
4.61173052994
]
},
{
"command": "pnpr@HEAD",
"mean": 3.0228706167400006,
"stddev": 0.12496569807068847,
"median": 2.9856391009400003,
"user": 2.7765666399999995,
"system": 3.1182890999999997,
"min": 2.90113371794,
"max": 3.35638316594,
"times": [
2.90113371794,
2.9867397559400004,
3.01901527094,
2.96031335394,
2.96511740194,
3.35638316594,
3.07083267894,
2.98453844594,
2.9802470219400004,
3.00438535394
]
},
{
"command": "pnpr@main",
"mean": 3.11724964854,
"stddev": 0.14778402361109697,
"median": 3.0334858429400002,
"user": 2.7675648399999995,
"system": 3.1424285999999997,
"min": 2.9712874139400003,
"max": 3.38990622794,
"times": [
3.03651652494,
3.21864898994,
3.2688450379400003,
3.38990622794,
3.24210836994,
3.0304551609400003,
3.00330314794,
3.0142546389400002,
2.9712874139400003,
2.9971709729400002
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.68372166262,
"stddev": 0.010419099675284068,
"median": 0.68456155042,
"user": 0.41326436,
"system": 1.3669416399999998,
"min": 0.66876915342,
"max": 0.70085562642,
"times": [
0.67459815942,
0.70085562642,
0.67781455942,
0.66876915342,
0.69264011542,
0.69481243842,
0.67227760642,
0.6844329314200001,
0.68632586642,
0.68469016942
]
},
{
"command": "pacquet@main",
"mean": 0.7047947592200001,
"stddev": 0.031046460257886148,
"median": 0.7006213694200001,
"user": 0.42565796,
"system": 1.3836935399999999,
"min": 0.66730151042,
"max": 0.78016573442,
"times": [
0.69986744042,
0.72735747642,
0.68540459542,
0.70576228242,
0.68285440042,
0.66730151042,
0.78016573442,
0.7065540944200001,
0.70137529842,
0.69130475942
]
},
{
"command": "pnpr@HEAD",
"mean": 0.76144602962,
"stddev": 0.06482046740639197,
"median": 0.73964484442,
"user": 0.44533616,
"system": 1.4049987399999997,
"min": 0.71444070042,
"max": 0.93344844942,
"times": [
0.7948135644200001,
0.71444070042,
0.76180235842,
0.73113893742,
0.73709453542,
0.73046924242,
0.75208749042,
0.71696986442,
0.93344844942,
0.74219515342
]
},
{
"command": "pnpr@main",
"mean": 0.75224671582,
"stddev": 0.016254246056042605,
"median": 0.75446642042,
"user": 0.44271695999999994,
"system": 1.42209414,
"min": 0.72893607842,
"max": 0.78156389742,
"times": [
0.73651324142,
0.75995993342,
0.78156389742,
0.76467656342,
0.73505602642,
0.72893607842,
0.74332283742,
0.76350573942,
0.75536347942,
0.75356936142
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 5.027861483080001,
"stddev": 0.041424145090647485,
"median": 5.02562452608,
"user": 3.9884457799999993,
"system": 3.5134641199999996,
"min": 4.954768201079999,
"max": 5.09877834808,
"times": [
5.04708189608,
5.02045360908,
5.09877834808,
5.018442589079999,
4.954768201079999,
5.0613447980799995,
5.018498614079999,
5.03079544308,
4.97569310008,
5.0527582320799995
]
},
{
"command": "pacquet@main",
"mean": 4.97875676578,
"stddev": 0.04856752263302355,
"median": 4.972212818579999,
"user": 3.9842779799999994,
"system": 3.49431302,
"min": 4.912165895079999,
"max": 5.059745909079999,
"times": [
4.94579767608,
5.006087745079999,
4.92239133908,
4.912165895079999,
4.95082062908,
5.036482727079999,
5.00965010008,
5.059745909079999,
4.97823563408,
4.9661900030799995
]
},
{
"command": "pnpr@HEAD",
"mean": 3.3716548649800004,
"stddev": 0.09320682223595282,
"median": 3.32939430408,
"user": 2.8846053799999996,
"system": 3.30852042,
"min": 3.26803265308,
"max": 3.5196771410800003,
"times": [
3.50080656708,
3.32513222808,
3.30893235408,
3.26827492008,
3.5196771410800003,
3.4341449920800002,
3.43647044308,
3.3214209710800002,
3.3336563800800003,
3.26803265308
]
},
{
"command": "pnpr@main",
"mean": 3.38095667068,
"stddev": 0.06865547324563391,
"median": 3.3697027465800002,
"user": 2.90637608,
"system": 3.3048372200000005,
"min": 3.26042392308,
"max": 3.49190496408,
"times": [
3.35848162508,
3.41270026908,
3.35992487308,
3.3794806200800003,
3.42222486108,
3.49190496408,
3.31735855908,
3.46209966408,
3.34496734808,
3.26042392308
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.4257510633,
"stddev": 0.01705936995791644,
"median": 1.4261599142,
"user": 1.4135469400000003,
"system": 1.7247357799999996,
"min": 1.3903228572,
"max": 1.4489954232000002,
"times": [
1.4162295892,
1.4259178932,
1.4211871522000001,
1.4459056972,
1.4135542992,
1.4358794262,
1.3903228572,
1.4264019352000001,
1.4331163602,
1.4489954232000002
]
},
{
"command": "pacquet@main",
"mean": 1.4502894119000003,
"stddev": 0.08471332092462294,
"median": 1.4198255507000002,
"user": 1.43425934,
"system": 1.7236204799999997,
"min": 1.4127675832000002,
"max": 1.6887705152,
"times": [
1.4246748442000001,
1.6887705152,
1.4529905522,
1.4158336092000001,
1.4133687912000001,
1.4216639572,
1.4178463402,
1.4127675832000002,
1.4179871442,
1.4369907822
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5035781184,
"stddev": 0.030609546286626068,
"median": 1.4982293967000002,
"user": 0.62286924,
"system": 1.6462999799999998,
"min": 1.4686845182000001,
"max": 1.5585962232000001,
"times": [
1.5411769542000002,
1.5037454302000002,
1.5585962232000001,
1.4767499612000001,
1.4927133632,
1.5306431022000002,
1.4778267002,
1.5052609812,
1.4803839502,
1.4686845182000001
]
},
{
"command": "pnpr@main",
"mean": 1.4914852974000001,
"stddev": 0.0312825876230705,
"median": 1.4849382247,
"user": 0.6488204399999999,
"system": 1.5917638799999998,
"min": 1.4550358962,
"max": 1.5707894312,
"times": [
1.4893361622,
1.5112308862000001,
1.5707894312,
1.4882240592,
1.4816523902,
1.4734119812000002,
1.4792952862,
1.4771708302000002,
1.4550358962,
1.4887060512
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.146567813,
"stddev": 0.027446726537973042,
"median": 3.1422510339,
"user": 1.84923776,
"system": 2.0450827,
"min": 3.1195941844,
"max": 3.1930645523999996,
"times": [
3.1283765444,
3.1574935733999996,
3.1212541723999996,
3.1417553004,
3.1427467674,
3.1478908224,
3.1924750264,
3.1195941844,
3.1930645523999996,
3.1210271863999997
]
},
{
"command": "pacquet@main",
"mean": 3.1723988989999996,
"stddev": 0.05679745703299382,
"median": 3.1511960824,
"user": 1.9367164600000002,
"system": 1.9987382999999999,
"min": 3.1137835594,
"max": 3.2978111273999997,
"times": [
3.1563425144,
3.1137835594,
3.1372813604,
3.1394682013999997,
3.1357846063999997,
3.1460496503999997,
3.1778615003999997,
3.2978111273999997,
3.1749377994,
3.2446686704
]
},
{
"command": "pnpr@HEAD",
"mean": 1.4797795603000001,
"stddev": 0.024752012464091682,
"median": 1.4718017748999999,
"user": 0.61145556,
"system": 1.6059224,
"min": 1.4540899864,
"max": 1.5241260824,
"times": [
1.5241260824,
1.5103315674,
1.5038727224,
1.4594088084,
1.4807483364,
1.4644581984,
1.4596808594,
1.4540899864,
1.4619336904,
1.4791453514
]
},
{
"command": "pnpr@main",
"mean": 1.4926236791,
"stddev": 0.0759463710282812,
"median": 1.4677749919,
"user": 0.63558966,
"system": 1.5711336,
"min": 1.4453113224,
"max": 1.7007307214,
"times": [
1.7007307214,
1.4829951724000001,
1.5194938524,
1.4620719504000002,
1.4709606024000002,
1.4702429114,
1.4554860794,
1.4453113224,
1.4653070724000001,
1.4536371064
]
}
]
} |
|
| Branch | pr/12588 |
| Testbed | pacquet |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result milliseconds (ms) (Result Δ%) | Upper Boundary milliseconds (ms) (Limit %) |
|---|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 5,027.86 ms(+5.12%)Baseline: 4,782.99 ms | 5,739.59 ms (87.60%) |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot 🚷 view threshold | 3,146.57 ms(+3.64%)Baseline: 3,035.97 ms | 3,643.17 ms (86.37%) |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 1,425.75 ms(+5.95%)Baseline: 1,345.69 ms | 1,614.82 ms (88.29%) |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot 🚷 view threshold | 4,809.59 ms(+2.36%)Baseline: 4,698.68 ms | 5,638.42 ms (85.30%) |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot 🚷 view threshold | 683.72 ms(+8.98%)Baseline: 627.39 ms | 752.86 ms (90.82%) |
|
| Branch | pr/12588 |
| 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 | 3,371.65 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 1,479.78 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 1,503.58 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 3,022.87 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 761.45 ms |
82b58ac to
8b9c70e
Compare
|
Code review by qodo was updated up to the latest commit 8b9c70e |
|
Code review by qodo was updated up to the latest commit 8b9c70e |
|
Code review by qodo was updated up to the latest commit a940447 |
1 similar comment
|
Code review by qodo was updated up to the latest commit a940447 |
|
Code review by qodo was updated up to the latest commit b442ec6 |
1 similar comment
|
Code review by qodo was updated up to the latest commit b442ec6 |
|
Code review by qodo was updated up to the latest commit 3662fc2 |
|
Code review by qodo was updated up to the latest commit 3662fc2 |
|
Code review by qodo was updated up to the latest commit a7b797f |
1 similar comment
|
Code review by qodo was updated up to the latest commit a7b797f |
Address review feedback on the fetch command: - Optional dependencies now follow production, matching pnpm's fetch (`optionalDependencies: opts.production !== false`), so `pacquet fetch --dev` no longer pulls optional deps. - Honor `config.trustLockfile` and `config.skipRuntimes` instead of hardcoding them off, mirroring `pacquet install` (fetch exposes no CLI override for either). - Set the new `disable_optimistic_repeat_install` Install field introduced on main, so fetch compiles after the rebase. Strengthen the integration tests to prove the contract rather than exit status: the no-lockfile path asserts a lockfile-specific error, and new cases verify `--prod` keeps optional/drops dev and `--dev` drops both production and optional. Written by an agent (Claude Code, claude-opus-4-8).
a7b797f to
9e7a3e4
Compare
|
Code review by qodo was updated up to the latest commit 9e7a3e4 |
1 similar comment
|
Code review by qodo was updated up to the latest commit 9e7a3e4 |
Bring the latest `main` (20 commits) into the pack port branch. The notable incoming changes for this branch: - #12644 (`test(git-fetcher): cover bundleDependencies closure depth cap`) added `bundle_dependencies_closure_stops_past_max_depth` to `git-fetcher/src/packlist/tests.rs`. This branch had already relocated that file to the standalone `fs-packlist` crate, so the change is a modify-vs-rename: git's rename detection carried the new test into `fs-packlist/src/tests.rs`, where it compiles and passes (the `MAX_BUNDLE_DEPTH` guard it covers lives there). fs-packlist now has 26 tests. - New pacquet CLI commands landed on `main` — audit (#12637, #12653), global (#12638), link (#12589), fetch (#12588), and list. Their dispatch arms auto-merged into `cli_args.rs` alongside this branch's `Pack` arm; the cli crate compiles with all of them. All four textual overlaps (`Cargo.toml`, `Cargo.lock`, `cli/Cargo.toml`, `cli_args.rs`) auto-merged with no conflict markers. The merged tree passes `cargo check --workspace --all-targets`; pack (23), exportable-manifest (28), fs-packlist (26), and git-fetcher (61) test suites all pass. No documentation in this PR went stale: `main` did not touch `cli/README.md` or the pack / exportable-manifest / fs-packlist crates.
Summary
Ports the pnpm fetch command to the pacquet Rust CLI. Fetches packages from the lockfile into the virtual store without resolving or writing a lockfile, by running the install pipeline with frozen_lockfile=true and ignore_manifest_check=true. The --prod and --dev flags filter which dependency groups are fetched.
Related to #11633
Squash Commit Body
Checklist
Summary by CodeRabbit
Summary by CodeRabbit
New Features
pacquet fetchcommand under the package store command group, with--prod/-Pand--dev/-Dflags to choose which dependency groups to fetch.Bug Fixes
fetchfollows the same reporting/execution behavior as related install-family commands.Tests
fetchfails without a lockfile.fetchsucceeds after a lockfile is generated and populates the package store.