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 check fails with only the bevy_dev_tools feature #15741

Closed
papow65 opened this issue Oct 8, 2024 · 0 comments · Fixed by #15743
Closed

cargo check fails with only the bevy_dev_tools feature #15741

papow65 opened this issue Oct 8, 2024 · 0 comments · Fixed by #15743
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled

Comments

@papow65
Copy link
Contributor

papow65 commented Oct 8, 2024

Bevy version

Fails: bef44d7
Works: 91bed8c (parent commit of bef44d7)

What you did

I compiled my project, with a recent version of bevy as a dependency. It no longer works.

What went wrong

cargo check fails using this configuration of bevy:

[dependencies]
bevy = { git = "https://github.com/bevyengine/bevy.git", rev = "bef44d7ac295ecbc", default-features = false,
   features = [ "bevy_dev_tools" ] }
Error[E0432]: unresolved import `crate::config::GizmoMeshConfig`
   --> .cargo/git/checkouts/bevy-f7ffde730c324c74/bef44d7/crates/bevy_gizmos/src/lib.rs:86:5
    |
86  | use crate::config::GizmoMeshConfig;
    |     ^^^^^^^^^^^^^^^---------------
    |     |              |
    |     |              help: a similar name exists in the module: `GizmoConfig`
    |     no `GizmoMeshConfig` in `config`
    |
note: found an item that was configured out
   --> .cargo/git/checkouts/bevy-f7ffde730c324c74/bef44d7/crates/bevy_gizmos/src/config.rs:200:19
    |
200 | pub(crate) struct GizmoMeshConfig {
    |                   ^^^^^^^^^^^^^^^
note: the item is gated here
   --> .cargo/git/checkouts/bevy-f7ffde730c324c74/bef44d7/crates/bevy_gizmos/src/config.rs:195:1
    |
195 | / #[cfg(all(
196 | |     feature = "bevy_render",
197 | |     any(feature = "bevy_pbr", feature = "bevy_sprite")
198 | | ))]
    | |___^

Additional information

cargo check succeeds when also using bevy_gizmos, and bevy_sprite:

[dependencies]
bevy = { git = "https://github.com/bevyengine/bevy.git", rev = "bef44d7ac295ecbc", default-features = false,
    features = [ "bevy_gizmos", "bevy_sprite", "bevy_dev_tools" ] }
@papow65 papow65 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Oct 8, 2024
@papow65 papow65 closed this as completed Oct 8, 2024
@papow65 papow65 reopened this Oct 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 8, 2024
# Objective
Fixes #15741

## Solution

- Copied the feature gates of a type to where the type is used.

## Testing

- `cargo check` works now using only the bevy_dev_tools feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant