You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Situation: I added the crate as a git dependency (tox on crate.io is still 0.1.1).
[dependencies.tox]
git = "https://github.com/tox-rs/tox.git"branch = "master"# tag = "v0.2.0"
With this cargo build fails… ☹️
❓ 🤔 Is there a use tokio::spawn; missing in some files?
cargo build
…
…
Compiling tox_core v0.2.0 (https://github.com/tox-rs/tox.git?branch=master#5ab95a61)
error[E0425]: cannot find function`spawn`in crate `tokio`
--> /home/nils/.cargo/git/checkouts/tox-a959b112c82f70eb/5ab95a6/tox_core/src/relay/client/client.rs:317:16
|
317 | tokio::spawn(async move { self.run(dht_sk, dht_pk).await });| ^^^^^ not found in`tokio`|
note: found an item that was configured out
--> /home/nils/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/lib.rs:546:19
|
546 | pub use task::spawn;| ^^^^^
= note: the item is gated behind the `rt` feature
help: consider importing this function
|
1 + use std::thread::spawn;|
help: if you import `spawn`, refer to it directly
|
317 - tokio::spawn(async move { self.run(dht_sk, dht_pk).await });
317 + spawn(async move { self.run(dht_sk, dht_pk).await });|
error[E0425]: cannot find function`spawn`in crate `tokio`
--> /home/nils/.cargo/git/checkouts/tox-a959b112c82f70eb/5ab95a6/tox_core/src/relay/server/server_ext.rs:130:24
|
130 | tokio::spawn(async move {
| ^^^^^ not found in`tokio`|
note: found an item that was configured out
--> /home/nils/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.34.0/src/lib.rs:546:19
|
546 | pub use task::spawn;| ^^^^^
= note: the item is gated behind the `rt` feature
help: consider importing this function
|
4 + use std::thread::spawn;|
help: if you import `spawn`, refer to it directly
|
130 - tokio::spawn(async move {
130 + spawn(async move {
|
For more information about this error, try `rustc --explain E0425`.
error: could not compile `tox_core` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
ℹ️ Cloning and building the tox crate directly succeeds. Shouldn't it result in the same error… 🤔 ❔
The text was updated successfully, but these errors were encountered:
antis81
changed the title
Build fails when used in a cargo git dependency
Build fails when used as a cargo git dependency
Nov 20, 2023
Situation: I added the crate as a git dependency (tox on crate.io is still 0.1.1).
With this☹️
cargo build
fails…❓ 🤔 Is there a
use tokio::spawn;
missing in some files?ℹ️ Cloning and building the tox crate directly succeeds. Shouldn't it result in the same error… 🤔 ❔
The text was updated successfully, but these errors were encountered: