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

Update dev-dependecy clap to v4.0 #76

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

g0hl1n
Copy link
Contributor

@g0hl1n g0hl1n commented Dec 18, 2022

This PR updates clap dependency to its latest version (3.1.6 => 4.0).

The clap update needed some changes in the code because of function deprecation in the clap v3.2.0 and clap v4.0.0 releases.

This PR is a follow-up of #72.

MSRV

Furthermore bump the MSRV to 1.60.0 as this is required by clap v4.0.0 (see clap-rs/clap#4060). 0a74354 reduced the MSRV because of a Yocto dependency. Currently following rust versions are used in the maintained yocto project versions:

Therefore this MSRV change (1.46.0 => 1.60.0) will drop kirkstone support, which is the current LTS release, supported until April 2024 at least (according to https://wiki.yoctoproject.org/wiki/Releases).

@jessebraham
Copy link
Member

Thanks for this. For the time being I think we should continue to support kirkstone, so I'm not too keen on bumping the MSRV just yet.

@g0hl1n
Copy link
Contributor Author

g0hl1n commented Dec 25, 2022

Ok. So I'll keep this open and updated so we can mere it whenever it fits.

Do you have any "next major release" label or 5.0 milestone where we can "attach" this?

@eldruin eldruin added this to the 5.0.0 milestone Mar 17, 2023
Remove the patch version in the dependency definition to get minor fixes
automatically. This shouldn't be a problem as clap should be API stable
across patch versions.

There were some deprecations in the 3.2.0 and 4.0.0 release which were
also fixed in this patch:

	ArgMatches::value_of   => ArgMatches::get_one::<T>
	ArgMatches::is_present => ArgMatches::get_flag
	Arg::takes_value(true) => Arg::num_args(1)
	Arg::validator         => Arg::value_parser
	Arg::possible_values   => Arg::value_parser(PossibleValuesParser::new())

For more information please see the corresponding changelog at
	https://github.com/clap-rs/clap/blob/master/CHANGELOG.md

Signed-off-by: Richard Leitner <[email protected]>
This is needed as clap v4.0.0 raised its MSRV to 1.60.0. For more
information please see the changelog:
	https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28

Or the corresponding PR:
	clap-rs/clap#4060

Signed-off-by: Richard Leitner <[email protected]>
g0hl1n added a commit to g0hl1n/serialport-rs that referenced this pull request Mar 21, 2023
This updates our direct bitflags dependency from 1.3.2 to 2.0. There
are no obvious changes necessary to our code base according to the
release notes [1].

Unfortunately for dev builds we now have 2 bitflags versions as clap
still depends on the 1.3.2 version. To resolve this issue there is an
extra PR open [2].

[1] https://github.com/bitflags/bitflags/releases
[2] serialport#76

Signed-off-by: Richard Leitner <[email protected]>
g0hl1n added a commit to g0hl1n/serialport-rs that referenced this pull request Mar 21, 2023
This allows 2.0.y bitflags versions. There are no obvious changes
necessary to our code base according to the release notes [1]. Therefore
this should be fine.

The range is given to avoid having 2 bitflags versions as clap
still depends on the 1.3.2 version. To resolve this issue there is an
extra PR open [2]. As soon as this got merged we can drop the 1.3.y
support.

We are excluding 2.1.y releases as bitflags may change the MSRV in minor
releases.

[1] https://github.com/bitflags/bitflags/releases
[2] serialport#76

Signed-off-by: Richard Leitner <[email protected]>
eldruin pushed a commit that referenced this pull request Mar 21, 2023
This allows 2.0.y bitflags versions. There are no obvious changes
necessary to our code base according to the release notes [1]. Therefore
this should be fine.

The range is given to avoid having 2 bitflags versions as clap
still depends on the 1.3.2 version. To resolve this issue there is an
extra PR open [2]. As soon as this got merged we can drop the 1.3.y
support.

We are excluding 2.1.y releases as bitflags may change the MSRV in minor
releases.

[1] https://github.com/bitflags/bitflags/releases
[2] #76

Signed-off-by: Richard Leitner <[email protected]>
sirhcel pushed a commit to sirhcel/serialport-rs that referenced this pull request May 10, 2023
This allows 2.0.y bitflags versions. There are no obvious changes
necessary to our code base according to the release notes [1]. Therefore
this should be fine.

The range is given to avoid having 2 bitflags versions as clap
still depends on the 1.3.2 version. To resolve this issue there is an
extra PR open [2]. As soon as this got merged we can drop the 1.3.y
support.

We are excluding 2.1.y releases as bitflags may change the MSRV in minor
releases.

[1] https://github.com/bitflags/bitflags/releases
[2] serialport#76

Signed-off-by: Richard Leitner <[email protected]>
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.

3 participants