servo: Merge #18489 - align selectors's features in geckolib and stylo_tests (from froydnj:geckolib-feature-alignment); r=froydnj
authorNathan Froyd <froydnj@gmail.com>
Wed, 13 Sep 2017 16:24:20 -0500
changeset 430268 962216b7844402a956a9b410fed0567506f96261
parent 430267 3b18e792cc3eb0bf381a422511c5bdde66f10af8
child 430269 b781fa50116313ce15a855eb24c534015288857b
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs18489
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #18489 - align selectors's features in geckolib and stylo_tests (from froydnj:geckolib-feature-alignment); r=froydnj Gecko would like to turn on the stylo layout tests (tests/unit/stylo) in Gecko CI. The plan for doing this is to add the tests as a dev-dependency of Gecko's main Rust library, from which `cargo test` can be run in the usual fashion. Doing this creates problems for normal development, because the stylo tests need the `selectors` crate to be compiled with `gecko_like_types`, whereas the `geckolib` crate does not. So if we compile `geckolib` in a non-test build configuration, the `selectors` crate is compiled without `gecko_like_types`...but then if we compile `geckolib` in a test build configuration, cargo will evict the previous rlib for the `selectors` crate and replace it with a `selectors` compiled with gecko_like_types. And then compiling `geckolib` in a non-test configuration repeats the process, and so forth. Needless to say, this is highly annoying behavior. It is due to a bug in cargo: https://github.com/rust-lang/cargo/issues/3923 but it's not known when that bug will get fixed. In the meantime, we can just make sure that geckolib's `selectors` is compiled with the same features as the `selectors` crate in the stylo tests. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors Source-Repo: https://github.com/servo/servo Source-Revision: 1aa8be392b0ab8e7a8426f525361b40b69d70b4f
servo/ports/geckolib/Cargo.toml
--- a/servo/ports/geckolib/Cargo.toml
+++ b/servo/ports/geckolib/Cargo.toml
@@ -17,15 +17,19 @@ gecko_debug = ["style/gecko_debug"]
 atomic_refcell = "0.1"
 cssparser = "0.21.0"
 env_logger = {version = "0.4", default-features = false} # disable `regex` to reduce code size
 libc = "0.2"
 log = {version = "0.3.5", features = ["release_max_level_info"]}
 malloc_size_of = {path = "../../components/malloc_size_of"}
 nsstring_vendor = {path = "../../components/style/gecko_bindings/nsstring_vendor"}
 parking_lot = "0.4"
-selectors = {path = "../../components/selectors"}
+# Turn on gecko_like_types because of so that crates which use this
+# crate and also dev-depend on stylo_tests get reasonable behavior
+# during rebuilds.  See https://github.com/rust-lang/cargo/issues/3923
+# for the cargo problem behind this.
+selectors = {path = "../../components/selectors", features = ["gecko_like_types"]}
 servo_arc = {path = "../../components/servo_arc"}
 style = {path = "../../components/style", features = ["gecko"]}
 style_traits = {path = "../../components/style_traits"}
 
 [dev-dependencies]
 stylo_tests = {path = "../../tests/unit/stylo"}