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

Wrong feature flags in tests #963

Open
YuanYuYuan opened this issue Apr 22, 2024 · 0 comments · May be fixed by #1003
Open

Wrong feature flags in tests #963

YuanYuYuan opened this issue Apr 22, 2024 · 0 comments · May be fixed by #1003
Labels
bug Something isn't working

Comments

@YuanYuYuan
Copy link
Contributor

Describe the bug

As titled.

To reproduce

cargo clippy --all-targets -p zenoh -- -D warnings
error: unused import: `zenoh::prelude::r#async::*`
  --> zenoh/tests/liveliness.rs:15:5
   |
15 | use zenoh::prelude::r#async::*;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`

error: unused import: `std::str::FromStr`
  --> zenoh/tests/matching.rs:14:5
   |
14 | use std::str::FromStr;
   |     ^^^^^^^^^^^^^^^^^
   |
   = note: `-D unused-imports` implied by `-D warnings`

error: unused import: `zenoh_core::ztimeout`
  --> zenoh/tests/liveliness.rs:16:5
   |
16 | use zenoh_core::ztimeout;
   |     ^^^^^^^^^^^^^^^^^^^^

error: unused import: `zenoh::prelude::r#async::*`
  --> zenoh/tests/matching.rs:16:5
   |
16 | use zenoh::prelude::r#async::*;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unused import: `zenoh_core::ztimeout`
  --> zenoh/tests/matching.rs:17:5
   |
17 | use zenoh_core::ztimeout;
   |     ^^^^^^^^^^^^^^^^^^^^

error: unused import: `zenoh_result::ZResult as Result`
  --> zenoh/tests/matching.rs:18:5
   |
18 | use zenoh_result::ZResult as Result;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant `TIMEOUT` is never used
  --> zenoh/tests/liveliness.rs:18:7
   |
18 | const TIMEOUT: Duration = Duration::from_secs(60);
   |       ^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`

error: constant `SLEEP` is never used
  --> zenoh/tests/liveliness.rs:19:7
   |
19 | const SLEEP: Duration = Duration::from_secs(1);
   |       ^^^^^

error: constant `TIMEOUT` is never used
  --> zenoh/tests/matching.rs:20:7
   |
20 | const TIMEOUT: Duration = Duration::from_secs(60);
   |       ^^^^^^^
   |
   = note: `-D dead-code` implied by `-D warnings`

error: constant `RECV_TIMEOUT` is never used
  --> zenoh/tests/matching.rs:21:7
   |
21 | const RECV_TIMEOUT: Duration = Duration::from_secs(1);
   |       ^^^^^^^^^^^^

error: could not compile `zenoh` (test "liveliness") due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `zenoh` (test "matching") due to 6 previous errors
error[E0425]: cannot find function `init` in crate `zenoh`
   --> zenoh/tests/session.rs:230:25
    |
230 |     let peer01 = zenoh::init(r1.clone()).res_async().await.unwrap();
    |                         ^^^^ not found in `zenoh`
    |
note: found an item that was configured out
   --> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
    |
330 | pub fn init(runtime: Runtime) -> InitBuilder {
    |        ^^^^
    = note: the item is gated behind the `unstable` feature

error[E0425]: cannot find function `init` in crate `zenoh`
   --> zenoh/tests/session.rs:232:25
    |
232 |     let peer02 = zenoh::init(r2.clone()).res_async().await.unwrap();
    |                         ^^^^ not found in `zenoh`
    |
note: found an item that was configured out
   --> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
    |
330 | pub fn init(runtime: Runtime) -> InitBuilder {
    |        ^^^^
    = note: the item is gated behind the `unstable` feature

error[E0425]: cannot find function `init` in crate `zenoh`
   --> zenoh/tests/session.rs:234:26
    |
234 |     let peer01a = zenoh::init(r1.clone()).res_async().await.unwrap();
    |                          ^^^^ not found in `zenoh`
    |
note: found an item that was configured out
   --> /home/circle/Workings/ZettaScale/src/zenoh/zenoh/src/lib.rs:330:8
    |
330 | pub fn init(runtime: Runtime) -> InitBuilder {
    |        ^^^^
    = note: the item is gated behind the `unstable` feature

For more information about this error, try `rustc --explain E0425`.
error: could not compile `zenoh` (test "session") due to 3 previous errors

System info

Skip

@YuanYuYuan YuanYuYuan added the bug Something isn't working label Apr 22, 2024
@YuanYuYuan YuanYuYuan linked a pull request May 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant