* Michael Widenius <michael.widenius@stripped> [10/09/16 12:42]:
> Konstantin> * Mats Kindahl <mats.kindahl@stripped> [10/08/27 18:06]:
> >> Proposal
> >> Every header file should be self-sufficient in the sense that for a
> >> header file my_header.h, the following should compile without errors:
> >> #include "my_header.h"
> >> An exception is made for generated files, for example, those generated
> >> by Yacc and Lex, since it is not possible to re-write the generators to
> >> produce "correct" files.
> Please consider compilation time!
> I just compiled MySQL on a solaris sparc box and even now it takes >
> 40 minutes. Adding self-sufficient headers will probably make this > 60
> minutes without adding any measure benefit to MySQL development.
We have already made a decision to move to the header guards
approach, and I believe that was done in 2009,
with Mats work that split and removed mysql_priv.h.
I think the patch was pushed in what is now 5.5 code tree in March
The current proposal is only suggesting, basically, that in
table.cc table.h is included first, before other headers, so that
table.h includes everything that is needed to declare table.h
classes and structures.
I think it won't increase the compilation time significantly.
BTW, if you're looking at 5.5, try out cmake compilation --
it's faster than autotools by a sizable margin (> 30%).