GNOME Bugzilla – Bug 563786
GNOME Goal: Clean up GLib and GTK+ includes
Last modified: 2010-03-12 23:19:53 UTC
Correct applications or libraries that don't include *only* toplevel headers for GLib, GTK, GDK and gdk-pixbuf. This will be useful to prepare GTK 3.0 migration. See also http://live.gnome.org/GnomeGoals/CleanupGTKIncludes
Created attachment 124222 [details] [review] simple patch
Could someone please review this ?
"*only* toplevel headers for GLib, GTK, GDK and gdk-pixbuf" is not correct. It won't be useful for gtk-3.0 migration. Removing #include <glib/gregex.h> will break code.
Well, my patch removes glib/gregex.h, and it builds fine with -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES Why do you think it will break code ?
Because it will break with glib-2.12
and not getting it in will break with glib-3.0 too.
Are you saying it's the only change needed for glib-3? Because it's something done in two minutes once it is actually needed. Sounds like breakage now is more expensive than two minutes of work in some indefinite future.
Could some #if GLIB_CHECK_VERSION (2, 12, 0) magic fix this to work in all cases?
let's not go out of our way to make our life difficult: - using single include doesn't buy us anything - single includes breaks with older glib that are at the moment a supported platform for some of our users - the patch is safely stored in bugzilla We'll apply it at some point, not just now. glib3 is science fiction at the moment when it will come out this will either be already fixed or will be trivial to fix.
Created attachment 149497 [details] [review] Use single includes Here a updated patch against current master.
Could be fixed, at least, the GTK+ includes? Some programs that depends on GtkSourceView can't use GNOME_MAINTAINER_MODE_DEFINES macro [1] because GtkSourceView doesn't use single includes [1] http://git.gnome.org/browse/gnome-common/tree/macros2/gnome-common.m4#n34
Created attachment 155997 [details] [review] Use only GTK+ single includes This patch only uses single GTK+ includes. The Glib ones are remaining
Comment on attachment 155997 [details] [review] Use only GTK+ single includes commit 5adad044464fc2c285f8f53ba198471eaae9b732
Created attachment 156000 [details] [review] Use only Glib single includes
since it seems that glib/gregex.h is in glib.h since glib 2.14 which we require anyway through the gtk 2.12 dependency, let's get this finally in
Comment on attachment 156000 [details] [review] Use only Glib single includes commit f977988dca83dd2be1cd851bcd3958bb1dc8538f
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you all!