Skip to content

bevy_state doesn't compile when only the bevy_app feature is enabled #13733

@vonforum

Description

@vonforum

Bevy version

ecdd162

What you did

Create an empty rust project. Edit Cargo.toml to add a dependency on bevy_state with default_features = false and features = [ "bevy_app" ]

bevy_state = { git = "https://github.com/bevyengine/bevy.git", default-features = false, features = [
	"bevy_app",
], }

Try to compile

What went wrong

Crate won't compile with the error:

error[E0046]: not all trait items implemented, missing: `enable_state_scoped_entities`

Additional information

This is because AppExtStates has a method enable_state_scoped_entities, but it's implementation on App is behind the bevy_hierarchy feature flag.

If this is required, I think either bevy_app should automatically enable the bevy_hierarchy feature, or the method in the trait should be feature gated as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ECSEntities, components, systems, and eventsC-BugAn unexpected or incorrect behaviorD-TrivialNice and easy! A great choice to get started with BevyS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions