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

Cargo build failure #13

Closed
gudjonragnar opened this issue May 13, 2021 · 1 comment
Closed

Cargo build failure #13

gudjonragnar opened this issue May 13, 2021 · 1 comment

Comments

@gudjonragnar
Copy link

gudjonragnar commented May 13, 2021

I added this to my cargo toml file:

[dependencies]
clickhouse = "0.6.3"
reflection = "0.1.3"

but when I run cargo build I get a failure saying:

   Compiling clickhouse v0.6.3
error[E0433]: failed to resolve: could not find `test` in `tokio`
   --> /Users/gudjonragnar/.cargo/registry/src/github.com-1ecc6299db9ec823/clickhouse-0.6.3/src/compression/lz4.rs:163:10
    |
163 | #[tokio::test]
    |          ^^^^ could not find `test` in `tokio`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0433`.
error: could not compile `clickhouse`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

I am quite new to Rust so I don't know what to do here, any thoughts?

I am running on MacOS BigSur if that is relevant.

@loyd
Copy link
Owner

loyd commented May 14, 2021

Thanks for reporting.

The reason is the use of tokio::test in the crate without explicit dependence on the tokio/macros feature. This has been unnoticed because developers usually use tokio/full in their code.

Tests don't catch it because the crate is building once both with deps and dev-deps (where tokio/macros is enabled).

Now fixed in v0.6.4.

@loyd loyd closed this as completed May 14, 2021
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

2 participants