Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error with 0.3.19 #166

Open
korken89 opened this issue Mar 23, 2019 · 10 comments
Open

Compile error with 0.3.19 #166

korken89 opened this issue Mar 23, 2019 · 10 comments

Comments

@korken89
Copy link

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`
@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

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?

@Manishearth
Copy link
Owner

The nightly build is broken right now due to the libtest changes, and we can't fix that without breaking the stable build.

@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

Looks like it's related to #162 (see this comment).

@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

@Manishearth Can't we just roll the libtest changes back? Why would that break the stable build?

@Manishearth
Copy link
Owner

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.

@Manishearth
Copy link
Owner

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.

@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

Can you please explain why that is the fix? Was 0.3.19 broken prior to #162 being merged?

@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

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?

@Manishearth
Copy link
Owner

#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

@laumann
Copy link
Collaborator

laumann commented Mar 23, 2019

#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 unstable feature 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants