pop-os / keyboard-configurator

Keyboard configuration UI
GNU General Public License v3.0
259 stars 45 forks source link

chore: update various dependencies #221

Closed decathorpe closed 5 months ago

decathorpe commented 8 months ago

I help with maintaining the Fedora package for this project, and noticed that a lot of the dependencies are starting to be out of date, and thought I could help out with some of them :)

I confirmed that with these changes, the application launches and runs (cargo run works), but I cannot test the actual functionality since I don't have the necessary hardware.

Detailed changes for all updated dependencies listed below.

There are some outdated dependencies that I didn't touch with this PR:

Side note: Maybe setting up something like dependabot would be a good idea here? It should help with keeping the "dependency drift" to a minimum.


According to the upstream release post, this is likely the last release of gtk-rs that contains bindings for GTK3. They recommend switching to gtk4.

Additionally, this includes some small API changes in the glib crate, which I have addressed in the same commit that bumped the dependency:

https://gtk-rs.org/blog/2023/08/28/new-release.html#replacement-of-glibcontinue--glibinhibit

This version brings in some fixes, including "Resolved soundness issue by switching from atty to is-terminal".

The patch to update these three has been carried downstream in Fedora for two years already.

Breaking API changes listed in the release notes for v2 and v3 do not affect this project.

Breaking API changes listed in the release notes for v1 do not affect this project.

This includes some code adaptations because zbus defaults to async functionality with the latest versions, which cannot be used here. So, the blocking module needs to be used, where necessary.

The bump to gtk-rs v0.18 raises the MSRV to 1.70. Incidentally, this version also matches rust-toolchain.toml.

decathorpe commented 8 months ago

(PS: Feel free to cherry-pick individual commits from this PR if you don't want to merge everything at once.)

crawfxrd commented 8 months ago

rustc versions on Debian/Ubuntu:

Would bumping MSRV prevent packaging for Ubuntu LTS?

decathorpe commented 8 months ago

rustc versions on Debian/Ubuntu:

* Ubuntu 22.04: 1.66

* Ubuntu 23.10: 1.71

* Debian 12: 1.63.0 ([v1.3.9 source code not compiling on Debian 12 #216](https://github.com/pop-os/keyboard-configurator/issues/216).)

* Debian 13: 1.70.0

Would bumping MSRV prevent packaging for Ubuntu LTS?

Good point ... I hadn't considered that debian / ubuntu don't get Rust compiler updates once they're out, we get "rolling" updates for all branches of Fedora.

In that case, maybe the gtk-rs v0.18 update should be done later? None of the other updates raise the MSRV above 1.64, as far as I can tell.

crawfxrd commented 8 months ago

GTK update should be dropped. Other deps can be squashed into 1 commit.

decathorpe commented 8 months ago

Makes sense to me, I'll do that later today.

Just out of curiosity, what would be the time horizon for an MSRV of 1.70 to be ok? Maintaining multiple versions of gtk-rs in Fedora is a big chore that I would like to avoid for prolonged stretches of time.

decathorpe commented 8 months ago

PR updated for feedback - gtk-rs v0.18 update dropped, all other commits squashed. Remaining changes:

As far as I can tell, none of these raise the MSRV.

crawfxrd commented 8 months ago

Just some rustfmt and clippy warnings failing. No real build breakages.

decathorpe commented 8 months ago

I've fixed the rustfmt issue. As for clippy warnings, there are quite a lot of them, and they are unrelated to my changes here, so I don't really think this PR is the right place to address them.

decathorpe commented 5 months ago

Is there something left that I need to do, or can I help with moving this forward in some other way?

leviport commented 5 months ago

We just need to review it, sorry for the delay. I'll put it on my list.

decathorpe commented 5 months ago

Thank you! :rocket:

decathorpe commented 5 months ago

My follow-up PR has fixes to un-break macOS builds and address all remaining warnings, feel free to cherry-pick that commit: https://github.com/pop-os/keyboard-configurator/pull/224/commits/ae77d42