emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.01k stars 97 forks source link

Update xkb_keymap reference #233

Closed brokenloop closed 3 years ago

brokenloop commented 3 years ago

The xkbcommon_sys crate seems to have been updated today, and now the minifb project won't compile.

We can fix this by updating XKB_KEYMAP_FORMAT_TEXT_v1 to XKB_KEYMAP_FORMAT_TEXT_V1.

emoon commented 3 years ago

Thanks!

brokenloop commented 3 years ago

No worries! Thanks for the great project.

emoon commented 3 years ago

So when I try to build locally now I get a compile error due to this change. Is there some cargo dependency that needs to be updated as well?

khyperia commented 3 years ago

So when I try to build locally now I get a compile error due to this change. Is there some cargo dependency that needs to be updated as well?

The issue is that xkbcommon_sys made a breaking change without the appropriate semver bump, which can cause all sorts of confusing situations.

Before this change, you must build with xkbcommon_sys<=0.7.4. After this change, you must build with xkbcommon_sys>=0.7.5. For context, as of writing, the most up-to-date version is 0.7.5.

emoon commented 3 years ago

I see. So I guess it's best to depend on the exact correct version then?

khyperia commented 3 years ago

Yeah, changing the current version to require 0.7.5 is I think the right path forward. I think old versions of minifb are just broken and can't be fixed, since a cargo update will bump xkbcommon_sys to 0.7.5, but oh well I guess (hopefully the same cargo update will bump minifb to the latest version with this patch as well).

eddyb commented 3 years ago

Did anyone get in touch with xkbcommon_sys maintainers? IMO they should yank semver-violating releases and bump the minor version instead.