-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Need a mechanism to write rust-version-specific code #3795
Comments
Nominating for maturity milestone 3 (feature-complete). |
I'd suggest it's more of a backwards-compatibility issue, figuring out how we wall off version incompatibility. |
This kind of thing is really useful for the RubySpec project. I don't think people will be building an alternate Rust any time soon, but it's also more comprehensive than the standard distribution's unit tests as well. Anyway. Just pointing it out since Rust is trying to learn so much from other languages. |
accepted for feature-complete milestone |
Still relevant. Note we have semver support in |
To implement this one just needs to, during cfg-stripping, compare any given rust_version to the current version. |
Accepted for 1.0, assigning P-backcompat-lang. |
cc #3392 |
What do we need to do to get this moving again? This should probably take into account #3392, which calls for version markers at the top of source files. That issue may be covered simply by putting the tags described herein at the top of crate files. |
Someone needs to come up with a way to integrate this and put it in an RFC. It seems that trying to implement it in the current As for #3392, implementing this issue and using top level |
We don't need to support anything older than whatever we release as 1.0, so On Wed, Jun 11, 2014 at 5:43 PM, Kasey Carrothers [email protected]
|
(I agree that doing anything on less than per-crate granularity is the path to madness) |
Nominating for removing from milestone because I don't believe this is backwards incompatible. |
P-low, not 1.0. |
A potential way to solve some of these use cases without impacting the language is to have cargo inject cfg variables related to crate versions (and remember a version of std is the same as the language version), e.g.:
It's very likely we can keep the language around crate files backwards compatible forever, so using something like this at the crate level could smooth over not just lib issues, but lang as well. |
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs#700 |
throw_unsup_format for alignment greater than 2^29 Fixes rust-lang#3687
Since rust is still going through active development, it's hard to write a library that works for both rust-0.4 and rust-incoming. We need a cfg
#[cfg(rust_version="0.5")]
to carve off chunks of code that have evolved in between versions.If we want to get more fancy with these controls, I do have an old semantic version parser I wrote back in the 0.3 days. Maybe we could use something like that to let us write checks like:
The text was updated successfully, but these errors were encountered: