I haven’t written about GTK+ development in some time. But now there are some exciting things happening that are worth writing about.
Back in June, a good number of GTK+ developers came together for a hackfest in Toronto, It was a very productive gathering. One of the topics we discussed there was the (lack of) stability of GTK+ 3 and versioning. We caused a bit of a firestorm by blogging about this right away… so we went back to the drawing board and had another long discussion about the pros and cons of various versioning schemes at GUADEC.
The final, agreed-on plan was published on the GTK+ blog, and you can read it there.
Fast-forward to today, and we’ve made good progress on putting this plan into place.
GTK+ has been branched for 3.22, and all future GTK+ 3 releases will come from this branch. This is very similar to GTK+ 2, where we have the forever-stable 2.24 branch. We plan to maintain the 3.22 branch for several years, so applications can rely on a stable GTK+ 3.
One activity that you can see in the branch currently is that we are deprecating APIs that will go away in GTK+ 4. Most deprecations have been in place for a while (some even from 3.0!), but some functions have just been forgotten. Marking them as deprecated now will make it easier to port to GTK+ 4 in the future. Keep in mind that deprecations are an optional service – you don’t have to rush to act on them unless you want to port to the next version.
To avoid unnecessary heartburn and build breakage, we’ve switched jhbuild, GNOME continuous and the flatpak runtimes over to using the 3.22 branch before opening the master branch for new development, and did the necessary work to make the two branches parallel-installable.
With all these preparations in place, Benjamin and Timm went to work and did a big round of deprecation cleanup. Altogether, this removed some 80.000 lines of code. Next, we’ve merged Emmanueles GSK work. And there is a lot more work queued up, from modernizing the GDK layer, to redoing input handling, to building with meson.
The current git version of GTK+ calls itself 3.89, and we’re aiming to do a 3.90 release in spring, ideally keeping the usual 6 months cadence.
We hope that at least some of the core GNOME applications will switch to using 3.90 by next spring, since we need testing and validation. But… currently things are a still a bit rough in master. The GSK port will need some more time to shake out rendering issues and make it as fast as it should be.
Therefore, we recommend that you stick with the 3.22 branch until we do a 3.89.1 release. By that time, the documentation should also have a 3 → 4 migration guide to help you with porting.
If you are eager to get ready for GTK+ 4 now, you can prepare your application by eliminating the deprecations that show up when you build against the latest 3.22 release.
This is an exciting time for GTK+ ! We will post regular updates as things are landing, but just following the weekly updates on the GTK+ blog should give you a good idea of what is going on.