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

Please don't recommend depending on clap="~major.minor.patch" #765

Closed
joshtriplett opened this issue Dec 5, 2016 · 2 comments
Closed

Please don't recommend depending on clap="~major.minor.patch" #765

joshtriplett opened this issue Dec 5, 2016 · 2 comments
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc... C-enhancement Category: Raise on the bar on expectations

Comments

@joshtriplett
Copy link
Contributor

Clap's README.md recommends depending on clap="~major.minor.patch", "to keep from being suprised of breaking changes". However, any actual breakage that would prevent compiling code written against an old version of clap with a new version of clap would involve a major version bump, which a "compatible version" dependency like clap="major.minor.patch" would also prevent. The only thing a "compatible version" dependency would allow would be a requirement on a new version of Rust or Cargo, which not every application needs to worry about.

Meanwhile, dependencies like "~major.minor.patch" mean that Linux distributions would have to package many different major.minor versions of clap to support various application dependencies on them. Linux distributions will already avoid packaging a version of clap that requires a version of Rust or Cargo newer than the one they ship.

Based on this, please consider changing the recommendation in README.md to suggest using a "compatible version" dependency unless your application specifically needs to maintain support for versions of Rust older than Clap's compatibility policy (two versions older than stable). This would significantly reduce the likelihood of having to package numerous versions of clap for Linux distributions.

@kbknapp
Copy link
Member

kbknapp commented Dec 5, 2016

I'll look at re-wording the readme. The primary point I want to get across is if someone is depending on on a pinned version of Rust, and clap's support moves past that pinned version. This will only happen in a minor version bump of clap, at a minimum.

Perhaps I could say use, ~major.minor.patch only if one is concerned about the minimum version of Rust sticking at a point lower than the compatibility policiy states (i.e. less than 2 stable releases back).

@kbknapp kbknapp added A-docs Area: documentation, including docs.rs, readme, examples, etc... D: easy C-enhancement Category: Raise on the bar on expectations labels Dec 5, 2016
@joshtriplett
Copy link
Contributor Author

joshtriplett commented Dec 5, 2016

@kbknapp

Perhaps I could say use, ~major.minor.patch only if one is concerned about the minimum version of Rust sticking at a point lower than the compatibility policiy states (i.e. less than 2 stable releases back).

That's exactly what I'm requesting; thank you.

kbknapp added a commit that referenced this issue Dec 7, 2016
kbknapp added a commit that referenced this issue Dec 8, 2016
homu added a commit that referenced this issue Dec 8, 2016
docs(README.md): adds guidance on when to use ~ in version pinning, a…

…nd clarifies breaking change policy

Closes #765

cc @joshtriplett
@homu homu closed this as completed in #767 Dec 8, 2016
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... C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants