Re: Feature branch launched: deheader

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Sun, 05 Dec 2010 19:03:32 -0700

On 12/05/2010 07:28 AM, Kinkie wrote:
> Hi all,
> Eric Raymond recently released a tool named deheader
> (http://www.catb.org/esr/deheader/) which goes through c/c++ project
> looking for unneeded includes.
> It does so by trying to compile each source file after removing one
> #include statement at a time, and seeing if it builds.
> I tried it on squid, and the result was unexpected: it seems that the
> c++ sources for squid contain up to 915 unneeded #include directives
> (on an Ubuntu box, with all build options enabled).
>
> The estimate is of course not realistic, as it can't account for other
> platforms or feature-includes, but it is still worth a check IMVHO.
> I've opened a feature-branch for the purpose at
> lp:~kinkie/squid/deheader with a first round of de-headerization.
>
> Thoughts? Comments?

Removing unneeded includes can reduce build time so this can be a useful
project, provided we do not end up spending more time fixing portability
bugs caused by header removal.

The results of this beheading should not be committed until the changes
are at least tested on Hudson, IMO.

Thank you,

Alex.
Received on Mon Dec 06 2010 - 02:03:55 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 06 2010 - 12:00:05 MST