-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: read from the local store if available #185
base: main
Are you sure you want to change the base?
Conversation
The parsing of integrity has been moved from tarball to serde
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
- Coverage 87.11% 85.35% -1.76%
==========================================
Files 56 56
Lines 2824 2882 +58
==========================================
Hits 2460 2460
- Misses 364 422 +58
☔ View full report in Codecov by Sentry. |
Micro-Benchmark ResultsLinux
|
Integrated-Benchmark Report (Linux)Scenario: Frozen Lockfile
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.16825778996923077,
"stddev": 0.017766973659097223,
"median": 0.1695753222,
"user": 0.06857247230769231,
"system": 0.09759384615384614,
"min": 0.1487157452,
"max": 0.2136408212,
"times": [
0.1809370282,
0.1695753222,
0.1527291172,
0.2136408212,
0.1521913082,
0.1487157452,
0.1704968392,
0.1587148262,
0.1758703372,
0.1526788442,
0.1775016632,
0.1571481612,
0.1771512562
],
"exit_codes": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"command": "pacquet@main",
"mean": 0.1581380815076923,
"stddev": 0.012571168685366469,
"median": 0.1606728522,
"user": 0.06710147230769231,
"system": 0.10010415384615384,
"min": 0.13988491919999999,
"max": 0.1793517002,
"times": [
0.1793517002,
0.1522446632,
0.1657439302,
0.13988491919999999,
0.1719861572,
0.1443337282,
0.1606728522,
0.1536287562,
0.1672633442,
0.1443176292,
0.1663551302,
0.1438228212,
0.1661894282
],
"exit_codes": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
]
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pnpm also verifies the actual content of the file in the store. If the content was mutate, the mutate files are removed and the package is redownloaded to the store. This can be done in a separate PR but then let's not forget about it.
crates/store-dir/src/cas_file.rs
Outdated
.to_hex(); | ||
assert!( | ||
matches!(algorithm, Algorithm::Sha512 | Algorithm::Sha1), | ||
"Only Sha1 and Sha512 are supported. {algorithm} isn't", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For files in the index only sha512 is supported. sha1 is supported for the tarball integrity because old packages in the registry have only sha1 checksum.
resolves #179
NOTE: this PR doesn't have test