Description
TLDR: A cargo update
in the root folder does not update the bevy/tests-integration/simple-ecs-state
crate. This means CI can get stuck in a failing state, and the fix is not obvious.
Bevy version
Relevant system information
Win10, cargo 1.87.0 (99624be96 2025-05-06).
What you did
cargo run -p ci
- the intention was to check CI while working on a PR.
What went wrong
> cargo test --manifest-path C:\[redacted]\bevy\./tests-integration\simple-ecs-test/Cargo.toml --tests --
error: failed to select a version for `coreaudio-sys`.
Expand for full error.
error: failed to select a version for `coreaudio-sys`.
... required by package `coreaudio-rs v0.11.3`
... which satisfies dependency `coreaudio-rs = "^0.11"` (locked to 0.11.3) of package `cpal v0.15.3`
... which satisfies dependency `cpal = "^0.15"` (locked to 0.15.3) of package `bevy_audio v0.16.0-dev (/mnt/data/Code/bevy_fork/crates/bevy_audio)`
... which satisfies path dependency `bevy_audio` (locked to 0.16.0-dev) of package `bevy_internal v0.16.0-dev (/mnt/data/Code/bevy_fork/crates/bevy_internal)`
... which satisfies path dependency `bevy_internal` (locked to 0.16.0-dev) of package `bevy v0.16.0-dev (/mnt/data/Code/bevy_fork)`
... which satisfies path dependency `bevy` (locked to 0.16.0-dev) of package `simple-ecs-test v0.0.0 (/mnt/data/Code/bevy_fork/tests-integration/simple-ecs-test)`
versions that meet the requirements `^0.2` (locked to 0.2.16) are: 0.2.16
all possible versions conflict with previously selected packages.
previously selected package `coreaudio-sys v0.2.17`
... which satisfies dependency `coreaudio-sys = "^0.2.17"` of package `bevy_audio v0.16.0-dev (/mnt/data/Code/bevy_fork/crates/bevy_audio)`
... which satisfies path dependency `bevy_audio` (locked to 0.16.0-dev) of package `bevy_internal v0.16.0-dev (/mnt/data/Code/bevy_fork/crates/bevy_internal)`
... which satisfies path dependency `bevy_internal` (locked to 0.16.0-dev) of package `bevy v0.16.0-dev (/mnt/data/Code/bevy_fork)`
... which satisfies path dependency `bevy` (locked to 0.16.0-dev) of package `simple-ecs-test v0.0.0 (/mnt/data/Code/bevy_fork/tests-integration/simple-ecs-test)`
failed to select a version for `coreaudio-sys` which could resolve this conflict
I guessed it was something that might go away after a cargo update
, but it didn't.
Later I found a discord comment, and the fix was to follow its suggestion of a cargo update
inside tests-integration/simple-ecs-test
rather than the Bevy root folder.
My assumption is that these kind of transient crate versioning errors are a fact of life and not a Bevy problem as such. The Bevy problem is that I expected a cargo update
to fix things and it didn't. It didn't fix things because a cargo update
in the root folder doesn't know to update tests-integration/simple-ecs-test
.
Can you suggest a fix?
I don't know enough about Cargo to be confident, but I'm assuming it's not possible for a cargo update
in the Bevy folder to be aware of the integration tests - the point of these tests is to simulate an entirely independent crate.
I did notice that CI already cleans the integration test crates after the tests:
Lines 80 to 86 in 8f08d6b
Perhaps the solution is to do a clean and update before the tests? Which seems presumptuous, but I haven't thought of a better option.