-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Don't reëxport bevy_image
from bevy_render
#16163
Don't reëxport bevy_image
from bevy_render
#16163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A flatter crate structure will help with compile times and it reduces the coupling between these crates. I do have a suggestion around adding a prelude
to bevy_image
, so that Image
and co. can still be included in the main bevy::prelude
, but that's a minor change and would help with the migration guide here too.
Definitely agree on a prelude + re-exporting. For 0.15, @atlv24 made the decision not to do this to ease migration, but I 100% agree that this is a better design in the long-term. |
So feel free to try it! The docs are great, but you may hit a wall or two. (I'll work on improving it once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will admit that i didnt make these changes mostly out of laziness but my excuse is that it kept my diff smaller so it was easier to review and merge. this is the way it should be done. incremental prs are good. thanks!
I'll address the feedback about the prelude this weekend. |
8f0f225
to
25033d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work!
@mockersf want this in 0.15 or 0.16? |
…vy_image-re-exports-from-bevy_render
…b.com:BenjaminBrienen/bevy into Remove-bevy_image-re-exports-from-bevy_render
Just pushed some minor changes:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bevy_image
is optional so it needs to be feature gated
Fixes #15940 Remove the `pub use` and fix the compile errors. Make `bevy_image` available as `bevy::image`. Feature Frenzy would be good here! Maybe I'll learn how to use it if I have some time this weekend, or maybe a reviewer can use it. Use `bevy_image` instead of `bevy_render::texture` items. --------- Co-authored-by: chompaa <[email protected]> Co-authored-by: Carter Anderson <[email protected]>
Objective
Fixes #15940
Solution
Remove the
pub use
and fix the compile errors.Make
bevy_image
available asbevy::image
.Testing
Feature Frenzy would be good here! Maybe I'll learn how to use it if I have some time this weekend, or maybe a reviewer can use it.
Migration Guide
Use
bevy_image
instead ofbevy_render::texture
items.