Description
When clap gets an addition that requires a newer version of Rust, what is the policy regarding semver updates?
For example, PR #737 increased the minimum Rust version required to build clap from 1.11.0 (which can compile clap 2.18.0) to 1.13.0 (which is required because of the questionmark
feature being recently stabilized).
This is a problem in practice for folks that need or want to support older versions of the Rust compiler specifically because cargo update
will cause builds to break. e.g., cargo update
will do a semver upgrade from clap 2.18.0
to clap 2.19.0
(once it's released), but this will break every single build on Rust 1.11 and Rust 1.12. There are solutions to the problem, such as adding a version constraint like <= 2.18.0
to one's Cargo.toml. Typically, this can be a particularly nasty problem when the issue lies in a transitive dependency. In clap's case at least, it's likely to not be a transitive dependency, which probably makes it a little easier to deal with.
Note that this has been a contentious issue discussed at length. Some people think it qualifies as a breaking change, and therefore requires a semver version bump (in clap's case, a major version bump). Others think the constraints it places on projects are too onerous and will be hard to live up to in practice. See rust-lang/rfcs#1619 for more discussion. See also: https://users.rust-lang.org/t/cargo-lock-libraries-and-ci/7698 --- Either way, I think it's important to establish a policy. One way to be proactive about it is (regardless of which side you come down on) is to put a specific Rust version in your CI testing. That way, you'll at least know when it happens, because it can otherwise be very tricky to keep track of!