-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement RFC 2052: Epoches #5011
Implement RFC 2052: Epoches #5011
Conversation
Thanks! Could some tests be added as well? Something like:
|
I think it would be more user-friendly to call the field in the toml If/when we grow the ability to specify a particular toolchain version (e.g. [package]
name = "failure"
version = "1.2.0"
rust = "2018"
toolchain = "1.31.0" |
src/cargo/core/features.rs
Outdated
#[derive(Clone, Copy, Debug, Hash, PartialOrd, Ord, Eq, PartialEq)] | ||
pub enum Epoch { | ||
/// The 2015 epoch | ||
Epoch2015 = 2015, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cute, but isn't the only effect of this to make this enum a u16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more there for forcing the PartialOrd to be the right order. But it's not necessary for Cargo; I just copied this definition from the Rust PR (where comparing epochs is more important)
Yeah, was writing the tests on the flight. Pushing now, will add the other tests you mentioned too. |
af7dd7c
to
ea76f99
Compare
Pushed up the tests. Note that right now it demands a string key, Regarding the outward facing name of the feature, @aturon, thoughts? (it's unstable so we don't need to decide this immediately, but there's also no rush on landing this anyway) |
ea76f99
to
5d615a6
Compare
We tend to require strings even when integers could suffice; we don't accept a version number of |
wfm. Though I think not allowing |
@Manishearth wanna switch to |
Done |
@bors: r+ |
📌 Commit 270f6e2 has been approved by |
… r=alexcrichton Implement RFC 2052: Epoches Todo: - Make epoches affect the fingerprint - Tests cc rust-lang/rust#44581 Rust PR: rust-lang/rust#48014 r? @acrichto
☀️ Test successful - status-appveyor, status-travis |
|
||
consider adding `cargo-features = [\"epoch\"]` to the manifest | ||
"))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing trailing newline
Todo:
cc rust-lang/rust#44581
Rust PR: rust-lang/rust#48014
r? @acrichto