-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Motivated by the resolver docs on features, I discussed the way that cargo handles feature resolution on Zulip: https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/How.20old.20is.20this.20feature.20resolving.20quirk.3F/with/523022575
From this I found out about the PR that introduces the resolver's backtracking on a failure to resolve features, allowing you to remove features without breaking dependents, as while they cannot upgrade, they also will not be forced to upgrade: #5000
I carried on with my day for... many days... until I found out about Cargo's docs on semver compatibility. I found out because cargo-semver-checks is following this advice, and has a lint called feature_missing, which is defined as SemVer major breakage in accord with this guidance. I have opened an issue about this: obi1kenobi/cargo-semver-checks#1285
I hope I understand the resolver's behavior correctly in thinking that feature removal, while maybe not SemVer patch material, would be sensible with a SemVer minor increase? It at least does not seem like it should be treated as unequivocally major version breakage for the vast majority of crates that have a sufficiently high MSRV to require a rustc that ships with a cargo that can handle this.