After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563786 - GNOME Goal: Clean up GLib and GTK+ includes
GNOME Goal: Clean up GLib and GTK+ includes
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
git master
Other Linux
: Normal trivial
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks: 563413
 
 
Reported: 2008-12-09 00:17 UTC by Luis Menina
Modified: 2010-03-12 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple patch (4.12 KB, patch)
2008-12-09 00:17 UTC, Luis Menina
none Details | Review
Use single includes (4.89 KB, patch)
2009-12-10 01:39 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Use only GTK+ single includes (3.12 KB, patch)
2010-03-12 18:13 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Use only Glib single includes (2.53 KB, patch)
2010-03-12 18:53 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description Luis Menina 2008-12-09 00:17:09 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
Comment 1 Luis Menina 2008-12-09 00:17:48 UTC
Created attachment 124222 [details] [review]
simple patch
Comment 2 Luis Menina 2009-01-08 00:56:43 UTC
Could someone please review this ?
Comment 3 Yevgen Muntyan 2009-01-08 02:48:13 UTC
"*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.
Comment 4 Luis Menina 2009-01-11 20:14:20 UTC
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 ?
Comment 5 Yevgen Muntyan 2009-01-11 20:30:18 UTC
Because it will break with glib-2.12
Comment 6 André Klapper 2009-01-25 21:23:07 UTC
and not getting it in will break with glib-3.0 too.
Comment 7 Yevgen Muntyan 2009-01-25 22:04:24 UTC
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.
Comment 8 Thomas Andersen 2009-02-10 15:21:06 UTC
Could some #if GLIB_CHECK_VERSION (2, 12, 0) magic fix this to work in all cases?
Comment 9 Paolo Borelli 2009-02-10 15:36:43 UTC
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.
Comment 10 Javier Jardón (IRC: jjardon) 2009-12-10 01:39:37 UTC
Created attachment 149497 [details] [review]
Use single includes

Here a updated patch against current master.
Comment 11 Javier Jardón (IRC: jjardon) 2010-02-05 02:15:00 UTC
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
Comment 12 Javier Jardón (IRC: jjardon) 2010-03-12 18:13:37 UTC
Created attachment 155997 [details] [review]
Use only GTK+ single includes

This patch only uses single GTK+ includes. The Glib ones are remaining
Comment 13 Javier Jardón (IRC: jjardon) 2010-03-12 18:18:32 UTC
Comment on attachment 155997 [details] [review]
Use only GTK+ single includes

commit 5adad044464fc2c285f8f53ba198471eaae9b732
Comment 14 Javier Jardón (IRC: jjardon) 2010-03-12 18:53:40 UTC
Created attachment 156000 [details] [review]
Use only Glib single includes
Comment 15 Paolo Borelli 2010-03-12 20:14:40 UTC
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 16 Javier Jardón (IRC: jjardon) 2010-03-12 23:19:06 UTC
Comment on attachment 156000 [details] [review]
Use only Glib single includes

commit f977988dca83dd2be1cd851bcd3958bb1dc8538f
Comment 17 Javier Jardón (IRC: jjardon) 2010-03-12 23:19:53 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release.

Thank you all!