Compile error with 0.3.19
Hi, we are getting a compile error that we have not seen before within this library, the error is as follows. Would you be aware what is causing this and how to fix it? It is causing the nightly Travis build to fail (eg this one https://travis-ci.org/rust-embedded/cortex-m-rt/jobs/510252119).
Thanks!
The errors:
error[E0432]: unresolved import `test::ColorConfig`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/common.rs:20:5
|
20 | use test::ColorConfig;
| ^^^^^^^^^^^^^^^^^ no `ColorConfig` in the root
error[E0433]: failed to resolve: could not find `OutputFormat` in `test`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:102:41
|
102 | format: if config.quiet { test::OutputFormat::Terse } else { test::OutputFormat::Pretty },
| ^^^^^^^^^^^^ could not find `OutputFormat` in `test`
error[E0433]: failed to resolve: could not find `OutputFormat` in `test`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:102:76
|
102 | format: if config.quiet { test::OutputFormat::Terse } else { test::OutputFormat::Pretty },
| ^^^^^^^^^^^^ could not find `OutputFormat` in `test`
error[E0425]: cannot find function `run_tests_console` in module `test`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:87:21
|
87 | let res = test::run_tests_console(&opts, tests.into_iter().collect());
| ^^^^^^^^^^^^^^^^^ not found in `test`
error[E0425]: cannot find value `AutoColor` in module `test`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:110:22
|
110 | color: test::AutoColor,
| ^^^^^^^^^ not found in `test`
error[E0412]: cannot find type `TestFn` in module `test`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:272:75
|
272 | pub fn make_test_closure(config: &Config, testpaths: &TestPaths) -> test::TestFn {
| ^^^^^^ not found in `test`
error[E0063]: missing field `exclude_should_panic` in initializer of `test::TestOpts`
--> /home/emifre/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.18/src/lib.rs:98:5
|
98 | test::TestOpts {
| ^^^^^^^^^^^^^^ missing `exclude_should_panic`
error: aborting due to 7 previous errors
Some errors occurred: E0063, E0412, E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0063`.
error: Could not compile `compiletest_rs`
Hi, that looks a little odd, if I understand your CI setup correctly, you only use compiletest with nightly?
Could it be that nightly has changed an we just haven't caught up yet?
The nightly build is broken right now due to the libtest changes, and we can't fix that without breaking the stable build.
Looks like it's related to #162 (see this comment).
@Manishearth Can't we just roll the libtest changes back? Why would that break the stable build?
No, rustc's libtest changed, we can't roll that back. It's part of a larger set of changes; @gnzlbg is working on it.
The fix is to use the libtest crate, however that crate doesn't work on stable right now, so we can't upgrade to use it.
Can you please explain why that is the fix? Was 0.3.19 broken prior to #162 being merged?
No, rustc's libtest changed, we can't roll that back.
Oh, I didn't read your comment closely enough, I think. How about a split down the middle, using libtest for nightly and the tester crate for stable?
#162 doesn't matter, we yanked that release
0.3.19 was broken on nightly prior to that being merged, I opened #162 to fix it, but the fix was broken.
Oh, I didn't read your comment closely enough, I think. How about a split down the middle, using libtest for nightly and the tester crate for stable?
We could except rust features don't let us turn off crates, only on. One suggestion is to add an unstable feature instead, but I was planning on just waiting for gnzlbg to make the changes
#162 doesn't matter, we yanked that release
Then I think we should just revert those commits. It's not even tagged, so it should be fine.
We could except rust features don't let us turn off crates, only on. One suggestion is to add an
unstablefeature instead, but I was planning on just waiting for gnzlbg to make the changes
Can we do both? Have both stable and nightly flags, and have default-features set to nightly. IIRC, you should be able to do:
[dev-dependencies]
compiletest_rs = { default-features = false, version = "*", features = ["stable"] }
(I'm probably missing some technicality here, but) it should allow us to continue the 0.3.x series for both nightly and stable.