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 696950 - Reorganize internal headers inclusion
Reorganize internal headers inclusion
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
Depends on:
Blocks:
 
 
Reported: 2013-03-31 08:05 UTC by Emanuele Aina
Modified: 2013-04-01 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use double quotes for all internal headers (106.19 KB, patch)
2013-03-31 08:05 UTC, Emanuele Aina
committed Details | Review
Avoid include path overspecifications (10.60 KB, patch)
2013-03-31 08:05 UTC, Emanuele Aina
committed Details | Review
Use a flat namespace for internal includes (101.97 KB, patch)
2013-03-31 08:05 UTC, Emanuele Aina
committed Details | Review
Use a flat namespace for internal includes (102.04 KB, patch)
2013-04-01 10:32 UTC, Emanuele Aina
committed Details | Review
Avoid include path overspecifications (10.60 KB, patch)
2013-04-01 10:32 UTC, Emanuele Aina
committed Details | Review
Use double quotes for all internal headers (106.19 KB, patch)
2013-04-01 10:32 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2013-03-31 08:05:00 UTC
Make internal headers usage more obvious by always using double quotes and a
flat namespace, to minimize the churn when changing how the source code is laid
out in the repository.
Comment 1 Emanuele Aina 2013-03-31 08:05:11 UTC
Created attachment 240190 [details] [review]
Use double quotes for all internal headers

This makes a bit more obvious which headers come from public libraries
and which ones come from uninstalled utility libraries.
Comment 2 Emanuele Aina 2013-03-31 08:05:19 UTC
Created attachment 240191 [details] [review]
Avoid include path overspecifications

If we're under the libempathy directory there's no need to prefix
include file paths with it, and the same is true for libempathy-gtk.
Comment 3 Emanuele Aina 2013-03-31 08:05:33 UTC
Created attachment 240192 [details] [review]
Use a flat namespace for internal includes

Directly add the libempathy, libempathy-gtk and extensions directories
to the include search path. This decouples header inclusions from their
location and helps when reorganizing the source files layout.
Comment 4 Guillaume Desmottes 2013-04-01 06:04:12 UTC
Review of attachment 240190 [details] [review]:

Please double check with smcv. IIRC he explained ages ago why this was not the proper way to do but I don't remember the rational. Actually it may have been about something completely different.
Comment 5 Guillaume Desmottes 2013-04-01 06:04:55 UTC
Review of attachment 240191 [details] [review]:

++
Comment 6 Guillaume Desmottes 2013-04-01 06:06:55 UTC
Review of attachment 240192 [details] [review]:

Agreed, it's a bit a while we want to reconsider the libempathy(-gtk) separation. Feel free to merge the 3 patches and ignore my first comment.
Comment 7 Emanuele Aina 2013-04-01 10:32:04 UTC
The following fixes have been pushed:
15460fa Use a flat namespace for internal includes
5c440c4 Avoid include path overspecifications
2ea4af7 Use double quotes for all internal headers
Comment 8 Emanuele Aina 2013-04-01 10:32:27 UTC
Created attachment 240292 [details] [review]
Use a flat namespace for internal includes

Directly add the libempathy, libempathy-gtk and extensions directories
to the include search path. This decouples header inclusions from their
location and helps when reorganizing the source files layout.
Comment 9 Emanuele Aina 2013-04-01 10:32:33 UTC
Created attachment 240293 [details] [review]
Avoid include path overspecifications

If we're under the libempathy directory there's no need to prefix
include file paths with it, and the same is true for libempathy-gtk.
Comment 10 Emanuele Aina 2013-04-01 10:32:41 UTC
Created attachment 240294 [details] [review]
Use double quotes for all internal headers

This makes a bit more obvious which headers come from public libraries
and which ones come from uninstalled utility libraries.