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

Cargo.toml instructions should suggest bio = "1" instead of bio = "*" #546

Open
ChaiTRex opened this issue Jul 24, 2023 · 0 comments
Open

Comments

@ChaiTRex
Copy link

On the home page of Rust-Bio's documentation, it says

To use Rust-Bio in your Rust project, add the following to your Cargo.toml

[dependencies]
bio = "*"

Crates like Rust-Bio should follow Rust conventions like semantic versioning, which says:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes
  2. MINOR version when you add functionality in a backward compatible manner
  3. PATCH version when you make backward compatible bug fixes

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

cargo uses that convention when figuring out which version of Rust-Bio to download. So, Cargo.toml should instead include, at the least:

[dependencies]
bio = "1"

To explain why, let's say that someone makes a nice library crate that depends on Rust-Bio. With bio = "*", that nice library crate will stop compiling successfully if a beneficial improvement to Rust-Bio ever requires making backwards-incompatible changes. The users of that nice library crate will not really be able to fix that themselves since they don't control that nice library crate. With bio = "1", the nice library crate will continue to use version 1 even after version 2 comes out, avoiding that problem.

Even if Rust-Bio will never make backwards-incompatible changes, it would then never have its major version changed, and so bio = "1" would also work fine in that scenario.

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

No branches or pull requests

1 participant