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

Flag to run cargo commands with the appropriate MSRV #196

Closed
epage opened this issue Sep 5, 2023 · 4 comments · Fixed by #202
Closed

Flag to run cargo commands with the appropriate MSRV #196

epage opened this issue Sep 5, 2023 · 4 comments · Fixed by #202
Assignees
Labels
C-enhancement Category: A new feature or an improvement for an existing one

Comments

@epage
Copy link
Contributor

epage commented Sep 5, 2023

I'm imagining a --rust-version flag that would add a +<package.rust-version> to each underlying cargo invocation.

@epage
Copy link
Contributor Author

epage commented Sep 5, 2023

Sometimes there is a different MSRV for development and release. I think a good next step past this is a flag to run cargo package on each workspace member, extract, patch, and then build those

Mentioning this now for the smaller issue in case it affects the CLI design for this one

@taiki-e
Copy link
Owner

taiki-e commented Sep 5, 2023

Thanks for the suggestion!

I think --version-range .. --version-step <large number> can do something similar, but it makes sense to have a dedicated flag.

https://github.com/taiki-e/cargo-hack#--version-range

If the lower bound of the range is omitted, the value of the rust-version field in Cargo.toml is used as the lower bound.

You can specify the version interval by using --version-step.

@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Sep 5, 2023
@epage
Copy link
Contributor Author

epage commented Sep 5, 2023

Oh, interesting. I agree that a short-hand for this would also be useful.

I can go add this if you are ok (which it sounds like)

@taiki-e
Copy link
Owner

taiki-e commented Sep 5, 2023

I can go add this if you are ok (which it sounds like)

Thanks. I would be happy to accept a PR to add this.

epage added a commit to epage/cargo-hack that referenced this issue Sep 5, 2023
epage added a commit to epage/cargo-hack that referenced this issue Sep 6, 2023
epage added a commit to epage/cargo-hack that referenced this issue Sep 6, 2023
epage added a commit to epage/cargo-hack that referenced this issue Sep 6, 2023
taiki-e pushed a commit that referenced this issue Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants