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

nightly broke tests #223

Closed
CAD97 opened this Issue Apr 30, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@CAD97
Copy link
Collaborator

CAD97 commented Apr 30, 2018

See https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/
See https://travis-ci.org/behnam/rust-unic/jobs/372843062

$ cargo test  --verbose --all --features serde
error: cannot specify features for more than one package

$ test "$TRAVIS_RUST_VERSION" != "nightly" || cargo test  --verbose --all --all-features
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:18:13
   |
18 |     assert!(std::char::UNICODE_VERSION.major <= unic::UNICODE_VERSION.major as u32);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:19:8
   |
19 |     if std::char::UNICODE_VERSION.major == unic::UNICODE_VERSION.major as u32 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:20:17
   |
20 |         assert!(std::char::UNICODE_VERSION.minor <= unic::UNICODE_VERSION.minor as u32);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:21:12
   |
21 |         if std::char::UNICODE_VERSION.minor == unic::UNICODE_VERSION.minor as u32 {
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:22:21
   |
22 |             assert!(std::char::UNICODE_VERSION.micro <= unic::UNICODE_VERSION.micro as u32);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:39:11
   |
39 |     check(std::char::UNICODE_VERSION);
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:29:31
   |
29 |     fn check(unicode_version: std::char::UnicodeVersion) {
   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:18:13
   |
18 |     assert!(std::char::UNICODE_VERSION.major <= unic::UNICODE_VERSION.major as u32);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:19:8
   |
19 |     if std::char::UNICODE_VERSION.major == unic::UNICODE_VERSION.major as u32 {
   |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:20:17
   |
20 |         assert!(std::char::UNICODE_VERSION.minor <= unic::UNICODE_VERSION.minor as u32);
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:21:12
   |
21 |         if std::char::UNICODE_VERSION.minor == unic::UNICODE_VERSION.minor as u32 {
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:22:21
   |
22 |             assert!(std::char::UNICODE_VERSION.micro <= unic::UNICODE_VERSION.micro as u32);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:30:17
   |
30 |         assert!(unicode_version.major <= unic::UNICODE_VERSION.major as u32);
   |                 ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:31:12
   |
31 |         if unicode_version.major == unic::UNICODE_VERSION.major as u32 {
   |            ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:32:21
   |
32 |             assert!(unicode_version.minor <= unic::UNICODE_VERSION.minor as u32);
   |                     ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:33:16
   |
33 |             if unicode_version.minor == unic::UNICODE_VERSION.minor as u32 {
   |                ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error[E0658]: use of unstable library feature 'unicode_version' (see issue #49726)
  --> unic/tests/unicode_version_tests.rs:34:25
   |
34 |                 assert!(unicode_version.micro <= unic::UNICODE_VERSION.micro as u32);
   |                         ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: add #![feature(unicode_version)] to the crate attributes to enable
error: aborting due to 17 previous errors
For more information about this error, try `rustc --explain E0658`.
error: Could not compile `unic`.

$ test "$TRAVIS_RUST_VERSION" != "nightly" || cargo build --benches --verbose --all --features 'bench_it'
error: cannot specify features for more than one package

The use of --features was not doing what we thought previously, and we'll need to change it to do what we want. #![feature(unicode_version)] in unic/tests/unicode_version_tests and removal of the bench_it feature (it's not pulling weight anyway, just put the benches into ./benches) should resolve this issue.

Unfortunately that means that the --features serde test will only happen on nightly (where we can use --all-features since we have some nightly-only features)

@CAD97

This comment has been minimized.

Copy link
Collaborator Author

CAD97 commented Aug 20, 2018

This was fixed by #229, right @behnam ?

@CAD97

This comment has been minimized.

Copy link
Collaborator Author

CAD97 commented Aug 20, 2018

Or wait, was this just the --features change..... I'll probably have some time later this week to put into this again (finally) so I'll refresh myself on everything then.

@behnam

This comment has been minimized.

Copy link
Member

behnam commented Aug 20, 2018

nightly build with --all-features was failing bcz of the unicode feature becoming partially stable, and the value we were using becoming a new feature, unicode_version. All is passing already, so I believe there's nothing more to do here anymore.

@behnam behnam closed this Aug 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.