Alexey Serbin has posted comments on this change. Change subject: [iwyu] first pass ......................................................................
Patch Set 15: > definitely woudl be nice to get rid of some of the more common > pragmas... here's a count from grep | uniq -c | sort -nk1 > > 10 #include <boost/optional/optional_fwd.hpp> // IWYU pragma: keep > 15 // IWYU pragma: no_include <gflags/gflags_declare.h> > 16 // IWYU pragma: no_include <ext/alloc_traits.h> > 26 #include <boost/bind.hpp> // IWYU pragma: keep > 27 // IWYU pragma: no_include <ostream> > 32 // IWYU pragma: no_include "kudu/util/logging.h" > 37 #include <glog/logging.h> // IWYU pragma: keep > > These are all from IWYU bugs? Are they known bugs? If we are going > to expect people to keep IWYU clean at precommit I wish it were a > bit less error-prone, otherwise the extra time spent on trying to > make it happy will outweigh any extra time saved with faster > builds, no? The issue with logging.h headers is resolved. I would attribute it to a bug in IWYU, but I worked it around using custom mappings for some symbols in the glog library. I think I can address the rest of non-boost pragmas. For the <ostream> and <gflags_declare.h> I can just follow the recommendations from the tool: the <ostream> is needed every time <glog/logging.h> is included and the 'ostream& ostream::operator <<(...)' is used, like LOG(INFO) << "Hello world"; The <ext/alloc_traits.h> requires deeper examination, but seems to be doable as well. The boost-related pragmas would require updating the existing boost mappings -- I will take care of that as well. > > Or is the plan to just periodically (eg once a month) run this and > fix any errors it comes up with, and hopefully those incremental > fixes will be smaller than this initial patch? As I understand, the idea was to have it as a pre-commit check. Yes, in that case it's necessary to complete the clean-up of those warnings. I'll try to do that today. -- To view, visit http://gerrit.cloudera.org:8080/4738 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6923091be36a1c03fac34dd73e6b17e17ac9ceaa Gerrit-PatchSet: 15 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: Jean-Daniel Cryans <jdcry...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: No