ci: use --locked when installing cargo-msrv and cargo-audit#746
Merged
Conversation
Merged
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.
What
Pass
--lockedto thecargo installinvocations forcargo-msrvandcargo-auditin CI.Why
Observed on #724 — failing run: https://github.com/apache/arrow-rs-object-store/actions/runs/27380222949/job/80920110172?pr=724
Without
--locked,cargo installignores theCargo.lockpublished alongside the tool and re-resolves all transitive dependencies to the latest semver-compatible versions at install time. This can pick up upstream releases that the tool's maintainers never tested against, leading to install failures that have nothing to do with our code.The MSRV job is currently failing for this reason.
cargo-msrv 0.19.3transitively depends on the AWS SDK (viarust-releases, which fetches the Rust release index from S3). Without--locked, cargo resolvesaws-runtimeto1.7.4, which does not compile on recent rustc due to a type-inference regression in its SigV4 signer:cargo-msrv's published
Cargo.lockpinsaws-runtime 1.7.2, which builds cleanly.--lockedtells cargo to honor it.Test
Tested locally with
cargo install cargo-msrv --locked --force