dtcristo / bevy_pixels

Bevy plugin that uses Pixels (a tiny pixel buffer) for rendering
https://docs.rs/bevy_pixels
Apache License 2.0
84 stars 12 forks source link

Cannot upgrade to bevy 0.14 #22

Open dc740 opened 2 months ago

dc740 commented 2 months ago

I gave it a quick try, because it's reaaaally easy -just replace app.world by app.world() and app.world_mut()- but then bevy_pixels stops compiling.

From what I could gather, pixels uses a very old winit (0.28), and for some reason it's OK with bevy 0.13, where you added 0.29 with specific features, but it's no longer the case after moving to bevy 0.14.

There are a lot of compilation errors claiming

...the trait `HasRawDisplayHandle` is not implemented for `WindowWrapper<winit...

Which makes sense, since that it deprecated and HasDisplayHandle should be used instead: https://docs.rs/raw-window-handle/latest/raw_window_handle/trait.HasRawDisplayHandle.html

I'm not entirely sure this is the cause of the conflict, but to me it looks like pixels needs to be updated, so bevy_pixels can also be updated.

I can provide a patch for the version bump, I reverted my local branch to 0.13, but it's really a 5 minute change.

EDIT: Looks like the story is way more complex: https://github.com/parasyte/pixels/issues/379 https://github.com/parasyte/pixels/issues/292 there is also raw-window-handle, which is the real reason why pixels can no longer compile, because it's a shared dependency between pixels and winit. So, if winit bumps the version, then pixels needs to bump the version, and bevy_pixels is only working thanks to the workaround on 0.29 that was also used here: https://github.com/parasyte/pixels/issues/379#issuecomment-1783657535

waynevanson commented 3 weeks ago

I created a new repository for to learn bevy and am on bevy@0.14.1 and came across this issue.

So we need to have matching versions of raw-window-handle between bevy, pixels, and bevy_pixels, is that correct?

If so, we need rwh_06 feature in winit compatible across all three because this dependency seems to be here in bevy_winit

To me it seems this PR is our only blocker.

Never thought I'd bump into you online too @dtcristo :smile: