Check entries' paths rather than path_bytes#114
Merged
Shnatsel merged 1 commit intorust-secure-code:masterfrom Feb 5, 2026
Merged
Check entries' paths rather than path_bytes#114Shnatsel merged 1 commit intorust-secure-code:masterfrom
paths rather than path_bytes#114Shnatsel merged 1 commit intorust-secure-code:masterfrom
Conversation
Member
Not really. |
Collaborator
Author
|
Thanks for your response, and thanks for the rapid merger of this PR! ⚡ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR changes how
db-dump.tar.gzentries are checked. Instead of usingpath_bytes, the new code usespath.crates.io recently started publishing deleted crates in a file
deleted_crates.csv: rust-lang/crates.io#12803That file would match this line:
cargo-supply-chain/src/crates_cache.rs
Line 207 in 18db9ea
Thus, if
deleted_crates.csvappeared later thancrates.csvindb-dump.tar.gz,deleted_crates.csvwould be used to populatecrates.json.The net effect was the following. If a user did
cargo supply-chain update --cache-max-age=0s, everything would appear to update fine. But if the user then didcargo supply-chain json, the wrong crates would be incrates.jsonand they would have to be downloaded (i.e., the cache would provide no benefit).Nits are welcome.
Separate from the above, would you consider a PR to rename
--cache-max-ageto--max-age, but keep--cache-max-ageas an alias?