Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMake optional the usage of some unstable features #18854
Conversation
|
I have some concerns about building individual crates with |
| @@ -20,7 +20,7 @@ doctest = false | |||
|
|
|||
| [features] | |||
| gecko_like_types = [] | |||
| unstable = [] | |||
| bench = [] | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
SimonSapin
Oct 13, 2017
Author
Member
Yeah, but not the first since we moved this crate in this repo and stopped caring about the version number.
| @@ -9,6 +9,9 @@ publish = false | |||
| name = "layout_thread" | |||
| path = "lib.rs" | |||
|
|
|||
| [features] | |||
| unstable = ["parking_lot/nightly"] | |||
This comment has been minimized.
This comment has been minimized.
| extern crate core; | ||
| use self::core::nonzero::NonZero; | ||
|
|
||
| pub type NonZeroU32 = NonZero<u32>; |
This comment has been minimized.
This comment has been minimized.
| @@ -9,6 +9,9 @@ publish = false | |||
| name = "compositing" | |||
| path = "lib.rs" | |||
|
|
|||
| [features] | |||
| unstable = ["nonzero/unstable"] | |||
This comment has been minimized.
This comment has been minimized.
| @@ -19,10 +19,14 @@ mod imp { | |||
| use self::core::nonzero::NonZero; | |||
|
|
|||
| pub type NonZeroU32 = NonZero<u32>; | |||
| pub type NonZeroUsize = NonZero<usize>; | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -10,6 +10,9 @@ publish = false | |||
| name = "gfx" | |||
| path = "lib.rs" | |||
|
|
|||
| [features] | |||
| unstable = ["simd"] | |||
This comment has been minimized.
This comment has been minimized.
| @@ -9,6 +9,9 @@ publish = false | |||
| name = "profile" | |||
| path = "lib.rs" | |||
|
|
|||
| [features] | |||
| unstable = [] | |||
This comment has been minimized.
This comment has been minimized.
| #[cfg(not(feature = "unstable"))] | ||
| /// The joint session future is the merge of the session future of every | ||
| /// browsing_context, sorted chronologically. | ||
| fn joint_session_future<'a>(&'a self, top_level_browsing_context_id: TopLevelBrowsingContextId) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
SimonSapin
Oct 13, 2017
Author
Member
Features being additive is important when one library might be used in the same projects by multiple crate maintained by different people. But the constellation crate is not intended to be used outside of this repository. We’ve never worried about backward compat within components/*.
| use euclid::Size2D; | ||
| use nonzero::NonZeroU32; |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Regarding |
|
I'm not sure how that Cargo bug relates, given its spurious rebuilds occur even with the same features selected. My issue is that |
Yes, because of that bug. And fixing that bug in Cargo will fix that problem. In the meantime I don’t know what to do about it. Adding |
I don't understand how this is considered a bug. Why should the workspace itself decide which features get used? That wouldn't even work for Servo, where Servo and geckolib don't use the same variants for all the crates. |
|
If I understand correctly, feature selection would be based on which top-level crate is being compiled, which itself is based on |
|
So there would still be an issue, where building |
|
With the bug fixed, |
|
@bors-servo r=nox (per IRC) |
|
|
Make optional the usage of some unstable features With `--no-default-features --features default-except-unstable`, more crates can now be compiled on stable Rust. This will help integrate them in rustc’s regression testing and compiler performance benchmarking. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18854) <!-- Reviewable:end -->
|
|
|
@bors-servo: retry |
Make optional the usage of some unstable features With `--no-default-features --features default-except-unstable`, more crates can now be compiled on stable Rust. This will help integrate them in rustc’s regression testing and compiler performance benchmarking. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18854) <!-- Reviewable:end -->
|
|
|
TIMEOUT [expected FAIL] /selectors-3_dev/xhtml1print/grid-first-letter-003.xht
|
|
@bors-servo retry #13730 |
Make optional the usage of some unstable features With `--no-default-features --features default-except-unstable`, more crates can now be compiled on stable Rust. This will help integrate them in rustc’s regression testing and compiler performance benchmarking. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18854) <!-- Reviewable:end -->
|
|
SimonSapin commentedOct 12, 2017
•
edited
With
--no-default-features --features default-except-unstable, more crates can now be compiled on stable Rust. This will help integrate them in rustc’s regression testing and compiler performance benchmarking.This change is