Skip to content

Commit

Permalink
Bug 1373878 - part 3 - add stylo_tests as a RustTest; r=rillian
Browse files Browse the repository at this point in the history
The easy part of this patch is the addition of the RustTest itself.

The more difficult to understand part of the patch is the changes to all
of our Rust build configuration.  We do this due to a bug in cargo:

rust-lang/cargo#3923

where features on dependent crates are not correctly taken into account
when determining whether cached artifacts on disk are valid and whether
they should be evicted from the disk cache.  The practical upshot of
this behavior is that, say, running gtests during normal development
when files in libxul are modified will:

* rebuild some Rust dependencies for libxul;
* link libxul;
* rebuild those same Rust dependencies *again* for libxul-gtest, since
  we have different features active and therefore the old artifacts look
  to be out of date;
* link libxul-gtest.

Needless to say, this is highly annoying and counterproductive behavior.

The "fix" is to ensure that the gkrust-shared crate explicitly depends
on crates and assigns features to them such that the feature sets do not
change between normal builds and testing builds.  This is admittedly
fragile, but it is not the first time this has come up, and is probably
not the last.
  • Loading branch information
froydnj committed Oct 2, 2017
1 parent 6e480ef commit 78d1dc4
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 148 deletions.
Loading

0 comments on commit 78d1dc4

Please sign in to comment.