Skip to content

Commit

Permalink
servo: Merge #18489 - align selectors's features in geckolib and styl…
Browse files Browse the repository at this point in the history
…o_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:

rust-lang/cargo#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

UltraBlame original commit: 962216b7844402a956a9b410fed0567506f96261
  • Loading branch information
marco-c committed Oct 2, 2019
1 parent 89dc120 commit 1b77f82
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions servo/ports/geckolib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,60 @@ parking_lot
.
4
"
#
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
=
{
Expand All @@ -212,6 +266,13 @@ components
/
selectors
"
features
=
[
"
gecko_like_types
"
]
}
servo_arc
=
Expand Down

0 comments on commit 1b77f82

Please sign in to comment.