Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1373878 - part 3 - add stylo_tests as a RustTest; r=rillian
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