Skip to content

Fix bevy not exporting bevy::extract - #25514

Merged
cart merged 1 commit into
bevyengine:mainfrom
MonaMayrhofer:fix-bevy-extract
Aug 25, 2026
Merged

Fix bevy not exporting bevy::extract#25514
cart merged 1 commit into
bevyengine:mainfrom
MonaMayrhofer:fix-bevy-extract

Conversation

@MonaMayrhofer

Copy link
Copy Markdown
Contributor

Objective

Fixes #25488

Solution

  • Export it

Testing

  • Successfully compiled a local project that did not build before the change.

Additional Info

This PR does not address the fact that currently the ExtractComponent macro must be imported via bevy::render::extract_component::ExtractComponent, in downstream projects as bevy_extract_macros is not exported.

This pattern is also used just in bevy itself:

use bevy_render::{
camera::ExtractedCamera,
extract_component::{ExtractComponent, ExtractComponentPlugin},
render_resource::{
binding_types::{sampler, texture_2d},

I am happy to also include fixes for these things in this PR if wanted, however I would need guidance on how, or if that should be solved.

@Zeophlite Zeophlite added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-App Bevy apps and plugins C-Bug An unexpected or incorrect behavior labels Aug 22, 2026
@Zeophlite

Copy link
Copy Markdown
Contributor

as bevy_extract_macros is not exported.

This is intentional - note that bevy_render_macros isn't exported either, but the derives in it are exported via bevy_render , and so bevy_extract re-exports from bevy_extract_macros.

This PR does not address the fact that currently the ExtractComponent macro must be imported via bevy::render::extract_component::ExtractComponent, in downstream projects

use bevy::extract::extract_component::ExtractComponent works too (both for derive and for manual impl).

This pattern is also used just in bevy itself:

This was intentional to reduce the diff. It's worth considering removing the re-export (probably remove internal usage, deprecate the bevy_render re-exports, then the next release cycle remove it).

@cart
cart added this pull request to the merge queue Aug 25, 2026
Merged via the queue into bevyengine:main with commit a51bda2 Aug 25, 2026
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-App Bevy apps and plugins C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bevy does not re-export bevy_extract as bevy::extract

3 participants