Skip to content
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

chore: Update MSRV to 1.74 #5343

Merged
merged 1 commit into from
Feb 8, 2024
Merged

chore: Update MSRV to 1.74 #5343

merged 1 commit into from
Feb 8, 2024

Conversation

epage
Copy link
Member

@epage epage commented Feb 8, 2024

No description provided.

@epage epage merged commit 1d9a554 into clap-rs:master Feb 8, 2024
23 checks passed
@epage epage deleted the msrv branch February 8, 2024 16:04
@digitalmoksha
Copy link

@epage As I'm fairly new to Rust, I have a question about this PR. I'm running a build in CI, which needs to install wasm-pack, which has been at version 0.12.1 for a few months.

I'm using rust 1.73.0. But when my job runs, it now fails because wasm-pack is dependent on version = "0.6.0" of clap-lex. But now it's pulling in 0.7.0 (as of just a few hours ago), which requires a version of rust beyond what I'm using.

What's the best way to deal with this when I don't own wasm-pack so can't change how dependencies are specified? It seems like updating the MSRV can wreak havoc on those that use the dependency.

@digitalmoksha
Copy link

And it's not like I can force a version in my own Cargo.toml file. Since I need to do a cargo install wasm-pack, I have no control over what versions of dependencies get compiled for wasm-pack. 🤔

@epage
Copy link
Member Author

epage commented Feb 9, 2024

Does passing --locked fix it for you?

The Cargo team generally assumes project lockfiles are compatible with their MSRV and recommend using --locked in these cases.

If wasm-pack doesn't maintain an MSRV then I recommend reaching out to them but pining to a specific version (cargo install --locked [email protected], version is made up) that works for you should still do.

Alternatively, if there is cargo-bin-install support (third party tool and cache) then you don't need to worry about MSRV.

@digitalmoksha
Copy link

Thank you, using --locked did it (cargo install --locked [email protected]).

TIL 🙇

@epage
Copy link
Member Author

epage commented Feb 9, 2024

Cargo should have recommended passing --locked in the error message:

package `{}` cannot be built because it requires rustc {} or newer, 
while the currently active rustc version is {}
Try re-running cargo install with `--locked`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants