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

clap 2.33.3 has incorrect MSRV due to bitflags 1.3 MSRV bump #2691

Closed
2 tasks done
CosmicHorrorDev opened this issue Aug 13, 2021 · 2 comments
Closed
2 tasks done

clap 2.33.3 has incorrect MSRV due to bitflags 1.3 MSRV bump #2691

CosmicHorrorDev opened this issue Aug 13, 2021 · 2 comments
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc...

Comments

@CosmicHorrorDev
Copy link
Contributor

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Clap Version

2.33.3

Where?

bitflags/bitflags#255

What's wrong?

The README states that clap >=2.21 has an MSRV of 1.42, but the dependency on bitflags = "1.2" allows for v1.3 which bumps the requirement up to 1.46

How to fix?

Either pin the requirement for bitflags to 1.2.x, bump the MSRV, or work with bitflags to see if something else can be sorted out

@CosmicHorrorDev CosmicHorrorDev added the A-docs Area: documentation, including docs.rs, readme, examples, etc... label Aug 13, 2021
@epage
Copy link
Member

epage commented Aug 13, 2021

This is one of those complications from MSRV:

  • imo the version constraint is correct and we shouldn't be overly constraining for the sake of MSRV.
  • Other crates are allowed to advance their MSRV without it being a breaking change.
  • However, the tools for supporting MSRV are still quite crude

The best I can offer at the moment is to use -Z minimal-versions or to patch the dependency.

@rfan-debug
Copy link

@epage I ran into the same error. Would you mind giving me an example how to patch the transitive dependency bitflags of clap? My rustc version is 1.42.0

I tried to use a patch as the following but it does not work.

[patch.crates-io]
clap = {git = "https://github.com/clap-rs/clap", tag = "v2.33.3"}

meain added a commit to meain/lsd that referenced this issue Jul 3, 2022
This was initially pinned because of clap-rs/clap/issues/2691, but we
use a newer version as MSRV as of now in CI.
meain added a commit to lsd-rs/lsd that referenced this issue Jul 5, 2022
This was initially pinned because of clap-rs/clap/issues/2691, but we
use a newer version as MSRV as of now in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc...
Projects
None yet
Development

No branches or pull requests

4 participants