bevy
bevy copied to clipboard
unresolved import `async_task::Builder`
Bevy version
latest
[Optional] Relevant system information
rust version: stable-x86_64-apple-darwin - rustc 1.74.0 os: macos 14.1.2
What you did
run: cargo run --example breakout
What went wrong
error[E0432]: unresolved import
async_task::Builder--> /Users/x/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:46:18 | 46 | use async_task::{Builder, Runnable}; | ^^^^^^^ no
Builder` in the root
|
= help: consider importing this struct instead:
std::thread::Builder
For more information about this error, try rustc --explain E0432
.
error: could not compile async-executor
(lib) due to previous error
warning: build failed, waiting for other jobs to finish...`
Manually deleting Cargo.lock
solved the issue for me.
I'm encountering the same problem running cargo run -p ci
, but able to build/run breakout just fine. I've tried removing Cargo.lock
and target/
.
My system is an m3 mac, so there's another difference.
dmlary@m3:~/src/bevy/vendor/bevy> cargo run -p ci
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
Running `target/debug/ci`
$ cargo fmt --all -- --check
$ cargo clippy --workspace --all-targets --all-features -- -Dwarnings
Finished dev [unoptimized + debuginfo] target(s) in 0.42s
$ cargo test --target-dir ../../target
Compiling erased-serde v0.3.25
Compiling hashbrown v0.14.0
Compiling serde_json v1.0.94
Compiling serde_derive v1.0.157
Compiling thiserror v1.0.40
Compiling bevy_reflect_derive v0.12.0 (/Users/dmlary/src/bevy/vendor/bevy/crates/bevy_reflect/bevy_reflect_derive)
Compiling bevy_ecs_macros v0.12.0 (/Users/dmlary/src/bevy/vendor/bevy/crates/bevy_ecs/macros)
Compiling async-executor v1.8.0
error[E0432]: unresolved import `async_task::Builder`
--> /Users/dmlary/.cargo/registry/src/index.crates.io-6f17d22bba15001f/async-executor-1.8.0/src/lib.rs:46:18
|
46 | use async_task::{Builder, Runnable};
| ^^^^^^^ no `Builder` in the root
|
= help: consider importing this struct instead:
std::thread::Builder
For more information about this error, try `rustc --explain E0432`.
error: could not compile `async-executor` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
thread 'main' panicked at tools/ci/src/main.rs:88:18:
Compiler errors of the ECS compile fail tests seem to be different than expected! Check locally and compare rust versions.: command exited with non-zero code `cargo test --target-dir ../../target`: 101
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Has this issue been upstreamed to async_executor or async_task?
I'm encountering the same problem running
cargo run -p ci
, but able to build/run breakout just fine. I've tried removingCargo.lock
andtarget/
.
When running cargo run -p ci
, it's running through several projects, some of which are not in the workspace so they don't share the same lock file. Those are the crates/*_compile_fail_tests crates, and you'll need to remove their individual lock files
Closing this out as this seems like it was a transient issue that was resolvable by just running cargo update
in the appropriate places and not something that was actually an issue with Bevy or its dependency tree.