This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

Transition to GtkSourceView 4

When porting an application to GtkSourceView 4/5 and GTK+ 4, the transition should be as smooth as possible. It means: being able to compile the code regularly and run the tests. Not doing all at once in one huge commit, but instead doing smaller and testable commits.

Edit: the namespace rename from GtkSource to Gsv has been cancelled. It will maybe be done in a later major version.

GtkSourceView 3.24 - done

Develop one more GtkSourceView 3 version, to have as few API breaks as possible for GtkSourceView 4 (other than removing deprecated APIs, and without counting the namespace change).

Last stable version of GtkSourceView 3, being backward-compatible with previous 3.x versions. Apps should have zero warnings to continue.

This version has been released in March 2017.

GtkSourceView 4.0

It is planned to rename the namespace from GtkSource to Gsv (755752). But it is a quite big change for applications. So ideally app developers should be able to do one commit with only the namespace change, and be able to test that commit. If the app developer has to also port the code to GTK+ 4 at the same time, it would be a mess.

GtkSourceView 4.0 will still depend on GTK+ 3, but with the new namespace.

Rationales for doing a stable version of GtkSourceView (shipped by distros) with the new namespace and still depending on GTK+ 3:

As is usual with library versioning, the major version is bumped each time there is an API break. So since the namespace change is an API break (and a big one), we bump the major version to 4. And when porting to GTK+ 3.90, we'll need to bump the major version one more time. The drawback is that the GtkSourceView and GTK+ versions will get out of sync. But already lots of GNOME libraries don't have the same versions as GTK+, so it is not a big problem.

The plan is:

The 3.99.x tarballs can be used by developers to port the code in finer-grained steps, to have smaller and testable commits. The 3.99.x tarballs will not be shipped by distros, developers need to compile them. But GtkSourceView 4.0 will be available as distro packages. The 3.99.x tarballs will be mentioned in the porting guide.

GtkSourceView 4.90

Old proposals for handling the namespace change

Proposal 1 - GtkSourceView 3.50 intermediary version

Proposal 2 - a set of GtkSourceView 3.89.x tarballs

Tarballs would be available for each 3.89.x version. But distros would package only GtkSourceView 3.24 and GtkSourceView 3.90. In the porting guide for GtkSourceView 4, app developers would be encouraged to do the port incrementally by compiling and testing against each GtkSourceView 3.89.x version (3.89.1 -> 3.89.2 -> 3.89.3 -> 3.90/4.0).

For us, it would be more complicated to backport bug fixes from GtkSourceView 3.9x to GtkSourceView 3.24.

Proposal 3 - a set of 3.49.x tarballs and 3.50 intermediary version

Take the best of Proposal 1 and 2.


2024-10-23 11:37