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

Incompatible with winit 0.28.x #47

Closed
pluiedev opened this issue Feb 13, 2023 · 2 comments · Fixed by #48
Closed

Incompatible with winit 0.28.x #47

pluiedev opened this issue Feb 13, 2023 · 2 comments · Fixed by #48

Comments

@pluiedev
Copy link
Contributor

winit 0.28.x introduced some breaking changes that broke egui_winit_platform:

error: Please select a feature to build for unix: `x11`, `wayland`
  --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:10:1
   |
10 | compile_error!("Please select a feature to build for unix: `x11`, `wayland`");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0392]: parameter `T` is never used
  --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/event_loop.rs:35:22
   |
35 | pub struct EventLoop<T: 'static> {
   |                      ^ unused parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: parameter `T` is never used
  --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/event_loop.rs:46:34
   |
46 | pub struct EventLoopWindowTarget<T: 'static> {
   |                                  ^ unused parameter
   |
   = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: parameter `T` is never used
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/event_loop.rs:350:27
    |
350 | pub struct EventLoopProxy<T: 'static> {
    |                           ^ unused parameter
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: parameter `T` is never used
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:635:20
    |
635 | pub enum EventLoop<T: 'static> {
    |                    ^ unused parameter
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: parameter `T` is never used
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:642:25
    |
642 | pub enum EventLoopProxy<T: 'static> {
    |                         ^ unused parameter
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`

error[E0392]: parameter `T` is never used
   --> /home/<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.27.5/src/platform_impl/linux/mod.rs:769:32
    |
769 | pub enum EventLoopWindowTarget<T> {
    |                                ^ unused parameter
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
    = help: if you intended `T` to be a const parameter, use `const T: usize` instead

For more information about this error, try `rustc --explain E0392`.
error: could not compile `winit` due to 7 previous errors
warning: build failed, waiting for other jobs to finish...

... Not sure where to begin to fix this! Maybe updating the dep on winit would suffice?

@hasenbanck
Copy link
Owner

Yes, updating the dep is the first step. Of course breaking changes would then have to be fixed. I haven't had a look at winit 0.28 yet, so I can't comment about it's changes.

@pluiedev
Copy link
Contributor Author

I made a quick fork and it looks like winit 0.28 itself didn't break anything egui_winit_platform cares about — it's just that winit added a compile error if you disabled all target platforms (see https://github.com/rust-windowing/winit/blob/265152355eefc4b3db0b44555043c349d72e2499/src/platform_impl/mod.rs#L57-L67), which occurs with default features disabled. I guess we can remove default-features = false for now?

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 a pull request may close this issue.

2 participants