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

Update to Bevy 0.15 #39

Merged
merged 12 commits into from
Dec 5, 2024
Merged

Update to Bevy 0.15 #39

merged 12 commits into from
Dec 5, 2024

Conversation

jgayfer
Copy link
Owner

@jgayfer jgayfer commented Oct 29, 2024

Summary

Big change for us here are required components. They let us trim down our public API quite a bit!

Released on crates.io as 0.5.0-rc.1

Closes #38

More work needed to move things over to required components and to ensure
extraction is done correctly, but gets us to the point where bevy_light_2d
is usable with bevy 0.15.
Required components allow us to move away from bundles (yay!) and into a
much simpler API.

I've always disliked how much of Bevy's internal components we need to
have in our bundles.
We can get away with inserting only components now.
@jgayfer jgayfer marked this pull request as ready for review December 2, 2024 21:54
@TurtIeSocks
Copy link

Thanks for this! I played with it a bit locally and had mixed results. I pulled it into a project that's using Bevy 0.15 and at least the basics seemed to work alright. Oddly, when I tried to build the crate itself or any of the examples I received some errors:

error[E0308]: mismatched types
   --> C:\Users\Me\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-23.0.1\src\dx12\suballocation.rs:39:67
    |
39  |         device: gpu_allocator::d3d12::ID3D12DeviceVersion::Device(raw.clone()),
    |                 ------------------------------------------------- ^^^^^^^^^^^ expected `ID3D12Device`, found a different `ID3D12Device`
    |                 |
    |                 arguments to this enum variant are incorrect
    |
    = note: `ID3D12Device` and `ID3D12Device` have similar names, but are actually distinct types
note: `ID3D12Device` is defined in crate `windows`
   --> C:\Users\Me\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-0.58.0\src\Windows\Win32\Graphics\Direct3D12\mod.rs:655:1
    |
655 | windows_core::imp::define_interface!(ID3D12Device, ID3D12Device_Vtbl, 0x189819f1_1db6_4b57_be54_1821339b85f7);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `ID3D12Device` is defined in crate `windows`
   --> C:\Users\Me\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-0.54.0\src\Windows\Win32\Graphics\Direct3D12\mod.rs:764:1
    |
764 | ::windows_core::imp::com_interface!(ID3D12Device, ID3D12Device_Vtbl, 0x189819f1_1db6_4b57_be54_1821339b85f7);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `windows` are being used?
note: tuple variant defined here
   --> C:\Users\Me\.cargo\registry\src\index.crates.io-6f17d22bba15001f\gpu-allocator-0.27.0\src\d3d12\mod.rs:243:5
    |
243 |     Device(ID3D12Device),
    |     ^^^^^^
    = note: this error originates in the macro `windows_core::imp::define_interface` which comes from the expansion of the macro `::windows_core::imp::com_interface` (in Nightly builds, run with -Z macro-backtrace for more info)

.... plus a lot more after this, I can add it if it's helpful

I tried cargo clean followed by cargo build as well as cargo run --example occlusion and both resulted in the same error.

@jgayfer
Copy link
Owner Author

jgayfer commented Dec 4, 2024

Interesting, thanks for testing!

What operating system are you using? I'm not able to reproduce on MacOS (or Fedora Linux).

@jgayfer
Copy link
Owner Author

jgayfer commented Dec 5, 2024

@TurtIeSocks Going to merge as I haven't been able to reproduce, and it seems to not be affecting consumers. Plus I'd like to get 0.15 support released :)

Please open an issue if needed, thank you!

@jgayfer jgayfer merged commit e85390e into main Dec 5, 2024
6 checks passed
@TurtIeSocks
Copy link

@TurtIeSocks Going to merge as I haven't been able to reproduce, and it seems to not be affecting consumers. Plus I'd like to get 0.15 support released :)

Please open an issue if needed, thank you!

No problem. I'm using Windows but I haven't been able to fully diagnose the error I was seeing. It seems very odd though that I could pull it in as a crate and have it build without issue and only get the error when trying to build the source/examples directly in the repo, so maybe some env issue. I'll play with it more later this week. Either way, thanks for the 0.15 support @jgayfer !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bevy 0.15 support
2 participants