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

Specify Rust compatibility of nursery crates #1619

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions text/1242-rust-lang-crates.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,32 @@ Deprecated crates move to rust-lang-deprecated and are subsequently minimally
maintained. Alternatively, if someone volunteers to maintain the crate,
ownership can be transferred externally.

### Compatibility with older compilers

The current version of rust-lang-nursery crates will currently be guaranteed to
compile on the **previous two stable releases** of Rust and forward. That is, if
the current stable release is 1.10, all nursery crates will compile successfully
on both 1.8 and 1.9. Some nursery crates may compile on older versions, but this
is not guaranteed and changes to the crate are allowed which bump the minimum
rustc version requirement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewording suggestion:

The most recent version of a rust-lang-nursery crate is guaranteed to compile on the current release of Rust, as well as the two previous stable releases. For example, if the current stable release of Rust is 1.10, all nursery crates will compile successfully on both 1.8 and 1.9 in addition to 1.10. Nursery crates may compile on older releases of Rust, but this is not guaranteed and cannot be relied on. Changes to nursery crates that increase the minimum supported Rust release are explicitly allowed, and are considered semver compatible changes: they do not require a major version bump for the nursery crate.


This will be implemented in practice by adding continuous integration to all
nursery crates which runs the test suite on older Rust versions. If a change is
made that breaks compatibility with an older Rust version, then the version can
be dropped if it was before two stable releases ago (e.g. by updating the
continuous integration configuration), or the change must wait to land
otherwise. If the minimum vesion of Rust is increased then this is not
considered a breaking change (e.g. does not require a new major release).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

femtonit: ie rather than eg


Crates are allowed to experiment with new stable features in Rust, however, that
are behind off-by-default Cargo features. For example the `panic::catch_unwind`
API, stabilized, in 1.10, could be behind a feature flag for crates until 1.12
is released.

Note that this policy may change over time. For example if LTS releases of the
compiler as created then it is likely that nursery crates will guarantee
compatibility with an LTS release.

## Advertising

Part of the reason for having rust-lang crates is to have a clear, short list of
Expand Down