Skip to content

Project that depends on Bevy with no default features but just feature [std] fails to compile (use of unresolved module or unlinked crate bevy_utils) #18200

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

Closed
alexgershberg opened this issue Mar 8, 2025 · 1 comment · Fixed by #18201
Assignees
Labels
A-Transform Translations, rotations and scales C-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps S-Needs-Investigation This issue requires detective work to figure out what's going wrong

Comments

@alexgershberg
Copy link

Bevy version

0.16.0-dev
commit: ab38b61

What you did

I've created a brand new project with cargo new bevy-example
and added a bevy dependency to my Cargo.toml like so:

[package]
name = "bevy-example"
version = "0.1.0"
edition = "2024"

[dependencies]
bevy = { git = "https://github.com/bevyengine/bevy.git", rev = "ab38b610011cdb66afbfcc95a79f2d6db44edce8", default-features = false, features = ["std"] }

What went wrong

doing cargo build results in this compilation error:

Image

Additional information

I'm not sure if I can use bevy with feature std on it's own, but this issue persists even if I use features std and async_executor.

You can get this exact compilation error if you clone bevy and try to build it with this command:
cargo build --no-default-features --features std

I think this may be caused by #17955 :( (I've followed the migration guide for that change but that hasn't resolved my error)

@alexgershberg alexgershberg added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Mar 8, 2025
@alexgershberg
Copy link
Author

@bushrat011899 We had a chat about this on Bevy discord, thought I would follow up with a GitHub issue

@bushrat011899 bushrat011899 added A-Transform Translations, rotations and scales S-Needs-Investigation This issue requires detective work to figure out what's going wrong P-Compile-Failure A failure to compile Bevy apps and removed S-Needs-Triage This issue needs to be labelled labels Mar 8, 2025
@bushrat011899 bushrat011899 self-assigned this Mar 8, 2025
github-merge-queue bot pushed a commit that referenced this issue Mar 8, 2025
# Objective

- Fixes #18200

## Solution

- Ensure `bevy_utils` is included with `bevy_transform/std`

## Testing

- `cargo build  --no-default-features --features std`

## Notes

Compilation failure was caused by `bevy_transform`'s new parallel
propagation system requiring `bevy_utils/std` when `bevy_transform/std`
was active, but it was left optional. Additionally,
`bevy_transform/async_executor` wasn't being enabled by
`bevy/async_executor`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Transform Translations, rotations and scales C-Bug An unexpected or incorrect behavior P-Compile-Failure A failure to compile Bevy apps S-Needs-Investigation This issue requires detective work to figure out what's going wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants