-
Notifications
You must be signed in to change notification settings - Fork 20
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 winit to 0.29.3 #325
Conversation
Weird, Linux linking failed. These seem like the most relevant error logs:
I wonder whether this is a bug in a third party library or a mistake in how I set up my dependencies. I haven't tested this PR on my Linux partition, so I'm not sure whether it usually works, and there's just a GitHub-related quirk. This may take a while to debug. EDIT: This ran fine on my debian installation, so this isn't something I can reproduce locally. EDIT2: The There does seem to have been an upgrade of EDIT3: Looking at this even further, the x11rb crate is looking into moving away from nix in the future in favor of rustix (psychon/x11rb#815). It seems like wayland wants to do this, too (Smithay/wayland-rs#653), and that might change the landscape. Given that the |
I'm going to turn link-time-optimization to see if this fixes anything. I don't really like this solution, though, as it makes compiling slower. If this does work, though, perhaps there's a way to turn on link-time-optimization specifically just for EDIT: Link-time optimization did not help. Either |
Looks like |
That probably makes the most sense. Besides the main issue at hand, winit seems pretty simple to update, so I'll go ahead and close this PR for now. EDIT: I think this PR might be the PR that would fix our issue: nix-rust/nix#2146 |
It's been over three months since I closed this PR. The underlying bug might now be fixed, even though the linked issue has not been touched. Bevy has been upgraded to 0.13, and that version of Bevy now uses winit 0.29, and given how popular that library is, I would expect that winit 0.29 should be ready now. I'm reopening this PR so that CI runs again. Hopefully, it will work this time. |
Huh, even though force-pushes are allowed while a PR is open, re-opening after a force push is not. I'm not sure why that restriction exists. It seems rather arbitrary. I'll open up a new PR. |
winit now defaults to raw-window-handle 0.6, but ash-window is not yet compatible with this version of raw-window-handle. Fortunately, the
rwh_05
feature allows the use of the older version of raw-window-handle.A few notable changes:
virtual_keycode
had to be replaced withphysical_key
orlogical_key
. I guessed thatphysical_key
was better.Event::MainEventsCleared
was removed from winit, so I needed to switch toAboutToWait
. However, I used https://github.com/rust-windowing/winit/blob/7bed5eecfdcbde16e5619fd137f0229e8e7e8ed4/examples/request_redraw.rs as an example, which had me make the additional change of putting all the frame logic inWindowEvent::RedrawRequested
and usingself.window.request_redraw
inEvent::AboutToWait
. I'm not certain this is what we want for Hypermine, but I didn't notice any issues on my end when testing it.