-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
With v0.3.20, compiletest with the "stable" feature seemingly stopped working:
error[E0658]: use of unstable library feature 'test' (see issue #27812)
--> /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.3.20/src/lib.rs:23:1
|
23 | extern crate libtest as test;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add #![feature(test)] to the crate attributes to enable
Also see https://travis-ci.com/rust-lang/miri/jobs/186258530
Activity
Manishearth commentedon Mar 20, 2019
As far as we could tell the stable feature didn't work anyway? If you look at the travis build history the stable builds are broken.
cc @gnzlbg
RalfJung commentedon Mar 20, 2019
Miri used the stable feature until this night (when it broke), so it definitely worked.
Manishearth commentedon Mar 20, 2019
Hm.
cargo +stable build --features stable
is broken on the previous version, though.Manishearth commentedon Mar 20, 2019
Anyway, @gnzlbg is going to update this with a stable libtest today, and stable will be the default soon for this crate
RalfJung commentedon Mar 20, 2019
What can I say, rust-lang/miri#650 landed and CI was green with 0.3.19.
dtolnay commentedon Mar 20, 2019
I noticed this too -- all my stable compiletest cron builds broke when updated from 0.3.19 to 0.3.20:
Locally,
cargo +stable build --features stable
fails at 64ecab2 but passes at its parent commit e2056b1. @Manishearth, beyond @gnzlbg's fixes I would like it if we could identify why we thought this build was already broken at the previous release so that we can patch up any remaining gaps in CI coverage for compiletest.Manishearth commentedon Mar 20, 2019
Yeah, once gnzlbg's fixes happen we can patch up CI to ensure it works too
dtolnay commentedon Mar 20, 2019
Sounds good, thanks.
fix: freeze compiletest_rs version due to bug
dtolnay commentedon Mar 21, 2019
Ping -- please yank 0.3.20 if a fix is not imminent, as downstream builds are still failing.
Manishearth commentedon Mar 21, 2019
Done.
RalfJung commentedon Apr 7, 2019
@Manishearth it would be great if you could say why you wrote this. The commit log looks very much like this crate was fine on stable until #162 landed.
Manishearth commentedon Apr 7, 2019
Ah, sorry, that was basically because two of us independently couldn't figure out why libtest could be linked against on stable in the first place, and my local test didn't work.
The reason my local test didn't work was that my stable toolchain was broken (it had been broken for deliberate reasons to test something) and didn't have the rust libs in the right place so it gave exactly the error I'd expect given what the code did. I later realized this and fixed my toolchain and stuff worked again.
(The reason we were surprised this works on stable is that rustc is basically a bit weird when it comes to linking against the shipped libtest, which is allowed but you can't use anything)
Manishearth commentedon Apr 7, 2019
Either way, now that we're doing the libtest stuff properly, there's a path forward for this crate to not need nightly anymore
RalfJung commentedon Apr 7, 2019
I think the
extern crate test
here resolves to https://github.com/messense/rustc-test/blob/master/Cargo.toml, and that's why things can be used. But I am not sure.Manishearth commentedon Apr 7, 2019
That's not mentioned in the Cargo.toml at all.
Rustc ships with a
libtest
, that's what's being pulled in.RalfJung commentedon Apr 7, 2019
It is:
In fact, this is pulled in exactly by the "stable" flag, which is why I think this is how things can work at all on stable:
Manishearth commentedon Apr 7, 2019
That should not work with
extern crate test
though, that should work withextern crate tester
RalfJung commentedon Apr 7, 2019
Yeah I thought so too, but there is no such line anywhere. Also notice that the
Cargo.toml
I linked above saysWon't that change the name through which the crate can get imported?
Manishearth commentedon Apr 7, 2019
I'm surprised you can do that.
Manishearth commentedon Apr 7, 2019
This explains at least one of the issues we had when trying to get the new libtest stuff to work :)
Manishearth commentedon Apr 7, 2019
rust-lang/cargo#6827
RalfJung commentedon Apr 7, 2019
I guess that explains the prior confusion then. :)
Where can we track the reverting of the libtest change that you mentioned?
Manishearth commentedon Apr 7, 2019
rust-lang/rust#59766 , it's done already. I'm opening a rustup PR now.
laumann commentedon Nov 12, 2019
@RalfJung Can I close this as being outdated?
RalfJung commentedon Nov 12, 2019
Yeah the stable feature is working again. :) Thanks!