Repository navigation
build: hold Cargo to crates at least 7 days old - #986
Merged
Merged
Conversation
Cargo 1.100 can refuse crate versions younger than a minimum age. Set it to 7 days for every Cargo run in src-tauri, the rule .npmrc and the Dependabot cooldown already apply, so a local cargo update or cargo add is held to it too. Versions already in Cargo.lock are kept. Closes #225 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014tzYxya6Umczq4EBPTYkX4
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.
Second and last step of #225, now that the toolchain is on Rust 1.100 (#985).
Change
src-tauri/.cargo/config.tomlgains:Cargo 1.100 stabilised this (RFC 3923). Every Cargo run started in
src-tauri/(local commands, every CI job,tauri build) now ignores crate versions published less than 7 days ago when it resolves, unless they are already inCargo.lock. That is the rule.npmrc(min-release-age=7) and Dependabot'scooldownalready apply; the difference is that it also holds a localcargo updateorcargo add, which the Dependabot cooldown never covered.The file documents the override for an urgent security fix (
CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p <crate> --precise <version>), and warns that a later plaincargo updatedowngrades such a crate again until it is 7 days old.AGENTS.mdrule 9 and the comment in.github/dependabot.ymlnow say the same. Dependabot's cargocooldownstays, so it does not open PRs the config would then refuse.Verified
On a scratch crate depending on
cc = "1.11"(1.11.2 published 6 days earlier):generate-lockfilewith a 7-plus-day age"0"CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update cc --precise 1.11.2cargo updateafterwardsOn this repository:
cargo check --workspaceleavesCargo.lockbyte-for-byte unchanged, andcargo update --dry-runreports "Locking 202 packages to highest compatible versions as of 7 days ago".Not verified: how Dependabot's own resolver treats the setting, in particular for a security update to a version under 7 days old.
Closes #225
Generated by Claude Code