On Wed, Apr 29, 2009 at 7:16 AM, Rainer Keller <[email protected]> wrote:
> Hi Jeff, > sure like to try to explain the matters. > The script check_unnecessary_headers.sh is not smart at all. > It checks whether a header, if known, is required due to some content. > It does not know about hierarchies of include files, or convenience headers > such as bindings.h and would delete the very headers mention below from > bindings.h. > > Now, only if we switch to a more sophisticated method (ctags?, munching > gcc's > preprocessed output?), this could be handled. > > My personal opinion however is, that every header and every source file > should > be self contained: > It should include all the headers with symbols it needs, no less, and > certainly not more ;-) That's an unusual coding style - we could debate the relative pros and cons of it for quite some time. Typically, if a body of code is going to all require the same headers, coding efficiency would put those dependencies in a common .h file, not explicitly copy/paste them into every individual file. Is this a convention we adopted somewhere along the line? I don't recall doing so. Not sure if it is a good one or not...certainly would appear to merit some discussion before enforcing it. FWIW: I understood you were simply going to remove unnecessary dependencies, not enforce new coding standards. :-) > > > Hope, this is a satisfactory answer? > > Thanks, > Rainer > > > > On Wednesday 29 April 2009 06:31:13 am Jeff Squyres wrote: > > Rainer -- > > > > Can you explain this a little more: > > > > In ompi/mpi/c/ header files are moved up into the actual c-file, > > where necessary (these are the only additional #include), > > otherwise it is only deletions of #include (apart from the above > > additions required due to notifier...) > > > > It looks like the addition of > > > > +#include "ompi/runtime/params.h" > > +#include "ompi/communicator/communicator.h" > > +#include "ompi/errhandler/errhandler.h" > > > > to lots of ompi/mpi/c/*.c files. I don't quite grok from your commit > > comment why that was a good thing...? > > > > Thanks! > > -- > ------------------------------------------------------------------------ > Rainer Keller, PhD Tel: +1 (865) 241-6293 > Oak Ridge National Lab Fax: +1 (865) 241-4811 > PO Box 2008 MS 6164 Email: [email protected] > Oak Ridge, TN 37831-2008 AIM/Skype: rusraink > > > _______________________________________________ > devel mailing list > [email protected] > http://www.open-mpi.org/mailman/listinfo.cgi/devel >
