Migrated Tilix from GtkD to GID bindings#2282
Conversation
Complete migration of Tilix terminal emulator from gtk-d bindings to gid (GObject Introspection D) bindings version 0.9.7. - Migrated 29 source files with ~400 GTK, ~100 GIO, ~100 GLib imports - Converted 193 signal handlers from addOn* to connect* pattern - Replaced in-tree secret module with gid:secret1 - Added workarounds for GID 0.9.7 bugs (getStrv, VTE setColors) - Created comprehensive migration documentation (GTKD-TO-GID-NOTES.md) - Updated build to require GDC compiler - All core functionality tested and working
19c775a to
b857b74
Compare
|
Keep in mind that you will most likely have to run the following if you want to try it locally: First line copies Tilix gresource file to ~/.local/share/tilix/resources, second line tells Tilix where to find the compiled gschemas. We can create a "local" dub config and in the post build step of that config run these two commands. I could not bother doing this... |
|
@ximion , could you please check this out. I know it is a huge PR but this is really important if we want to move further and eventually have Tilix run on GTK4... |
|
This is a ton of work, thank you for doing it! Some basic questions first: Why is GID better than GtkD / why should this switch happen? Is GtkD abandoned or obsolete? In order to keep Tilix in Linux distros easier, could GID add Meson support (and have that in turn plumbed up with Tilix)? Creating static libraries for GID with Meson to work around ABI instability is fine, but Meson is still way easier to handle for distros than dub is. |
|
Thank you for having a look! |
|
Yes, but not too soon, unless you are on your way to FOSDEM like me right now and we talk there :-) (during the conference and while traveling, I will definitely not be online much). |
|
Any advance in this PR ? Bindings for GTK 4 would be nice and I'm suspect gtkD does not support GTK4. |
|
After discussion with @ximion I realised that in order to make this change accepted by the Debian and Fedora there is much more work that would be needed - each gid:subpackage would need to be turned into a separate Debain/Fedora/etc package - something I just do not have time and will to work on, especially considering I do not use Tilix. I use DTerm, a GTK4 terminal, again in D, I have been working on for quite some time. Most likely this many-days work was for nothing. Sad but true. |
|
but debian work is on debian maintainers, this shouldn't influence this project decisions |
Tilix Migration: GtkD to GID Bindings
This PR completes the migration of Tilix from
gtk-dbindings togid(GObject Introspection D) bindings version 0.9.7.(This is a natural step towards making Tilix work on top of GTK4 - gid:gtk4 and gid:vte3 are already having everything needed for that migration.)
Overview
The migration involved 72 tasks across 12 phases, converting the entire codebase to use the newer GID bindings which provide better GObject introspection support.
Scope of Changes
Files Modified: 29 source files
Import Conversions:
gtk.*→gtk.snake_case)gio.*→gio.snake_case)glib.*→glib.snake_case)Signal Handler Conversions: 193 handlers converted from
addOn*toconnect*patternDependencies Changed:
gtk-d:*packagesgid:gtk3,gid:vte2,gid:gdk3,gid:gio2,gid:glib2,gid:gdkpixbuf2,gid:pango1,gid:pangocairo1,gid:cairo1,gid:secret1(all version 0.9.7)secretmodule (replaced bygid:secret1)Key Changes by Phase
Phase 1-6: Project Setup & Core Infrastructure
dub.jsonwith GID dependenciesgx.gtk.*)gtkc.*to*.c.functions/*.c.typesPhase 7-8: Tilix Application & Terminal
application.d,appwindow.d,session.d)terminal.d- most complex file with 50+ imports and 50+ signal connections)gid:secret1Phase 9: Preferences & Bookmarks
Phase 10: Testing & Bug Fixes
getStrv()bug that returned only 1 elementPhase 11-12: Documentation
README.mdwith new build instructionsGTKD-TO-GID-NOTES.mdwith 62 sections documenting migration patternsBuild Instructions
Compiler Requirement: GDC (GNU D Compiler) is required.
Testing Summary
Known Issues
Session Load/Switch Edge Case
ppoll(appears frozen)Bookmark Chooser Crash
~/.config/tilix/bookmarks.jsondirectlyGLib-GObject-CRITICAL Warnings
g_value_get_pointer: assertion 'G_VALUE_HOLDS_POINTER (value)' failedWayland/Flatpak Not Tested
Migration Documentation
A comprehensive migration guide has been created in
GTKD-TO-GID-NOTES.mdcovering:This document serves as a reference for future GtkD to GID migrations.
Credits