open-i18n / rust-unic

UNIC: Unicode and Internationalization Crates for Rust

Home Page:https://crates.io/crates/unic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nightly broke tests

CAD97 opened this issue · comments

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)

This was fixed by #229, right @behnam ?

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.

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.