Re: Patch has been committed, but there are outstanding files including files they shouldn't.



Maciej Stachowiak <mjs noisehavoc org> writes:

> On 18Nov2001 07:59AM (-0500), Owen Taylor wrote:
> > 
> > 
> > Yes, these all need to be fixed as well. (Especially the
> > gnometypebuiltins.h use)
> > 
> > Because these didn't show cause errors, they are actually all useless
> > includes and probably should just be removed, though that is somewhat
> > up to the taste of the module maintainer. For gdk-pixbuf-loader.c, I
> > just removed the include there.
> > 
> > I guess we need to move the invalid include checks _outside_ the
> > repeated include guards to catch cases like this ... but I'll give you
> > some time to fix these before I do that.
> 
> 
> What's the reason for the invalid include checks? Couldn't the headers
> all be made self-contained and directly includable? It can be awkward
> to work with systems that don't want you to include certain headers
> directly or want them included in a particular order.

Tim says the policy is that you must include glib-object.h, and he
doesn't want to try to make them directly includeable. If that's
the policy, we need to enforce it.

I personally prefer "every header can be included standalone for
projects that I maintain", but I don't think headers that error out
with a error message telling you what to include instead are a real
problem ... it's implicit ordering that is hell.

And in defense of the policy, it does appear most explicit includes
are mistakes:

 * People include <gobject/gobject.h> by analogy with gtk/gtk.h
   not realizing that <glib-object.h> is the everything include.
   (gobject/gobject.h holds GObject)

 * People changed includes of gtk/gtkenums.h to includes of 
   gobject/genums.h, though they are completely different things.
   (Or, this is my guess as to why things are include genums.h
   directly since it doesn't seem particularly interesting to do.)

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]