Thanks for looking into it. I can't really follow up very easily since I'm travelling, but I'm looking forward to a fix :-). I think there are lots of files which don't quite follow the rules since things were looser in the early days, and even when there were rules established we didn't have a checker for them right away. It's good to fix things up when there's an opportunity, or if the style checker doesn't like your change because of the code it touches.
Gabe On Sun, May 5, 2019 at 5:43 PM Zigerelli, Andrew D <an...@pitt.edu> wrote: > Include order workaround: > @@ -363,6 +363,19 @@ > new = list(self.sort_includes(old, norm_fname, language)) > > modified = _modified_regions(old, new) & regions > + if modified: > + gem_path = os.environ['GEM5_PATH'] > + new_filename = os.path.join(gem_path, 'new.txt') > + old_filename = os.path.join(gem_path, 'old.txt') > + # remove old versions > + with open(new_filename, "a") as f: > + f.write(filename + " new\n") > + for l in new: > + f.write(l+'\n') > + with open(old_filename, "a") as f: > + f.write(filename + " old\n") > + for l in old: > + f.write(l+'\n') > > I just make the changes manually by looking at the difference between old > and new. > > There seems to be a mismatch between what verifiers.py expects to change, > and what actually gets changed. I think the bug has to do with ordering > internal to verifiers.py and ordering outside of it. > > Sorry for being vague; I didn't actually track down why the mismatch > happens. > > Andrew > > -----Original Message----- > From: gem5-dev <gem5-dev-boun...@gem5.org> On Behalf Of Gambord, Ryan > Sent: Friday, May 3, 2019 10:15 PM > To: gem5 Developer List <gem5-dev@gem5.org> > Subject: Re: [gem5-dev] include order style checker bug > > I can confirm it's been doing this for a while now on my end. Lots of > existing files in gem5 fail the style checker when I modify them, so it > seems to be at least somewhat recent, or people were overriding the style > checker in the past. > > Ryan Gambord > > On Thu, May 2, 2019, 22:58 Gabe Black <gabebl...@google.com> wrote: > > > Here's another potentially related bug. There was an extra space > > between the final header and the using at the top of a .cc, and the > > style fixer decided to move the include of the corresponding .hh from > > the top where it belonged down into the list of includes in alphabetic > > order. It still complained about the headers after, but when told to > > fix it it made no changes. It seems the fixer doesn't always recognize > > when the .hh corresponding to a .cc needs to be at the top. > > > > Gabe > > > > On Thu, May 2, 2019 at 10:50 PM Gabe Black <gabebl...@google.com> wrote: > > > > > Hey folks. I just ran into a bug in the style checker/fixer, and > > > since I wanted to make sure I kept track of those so they can be > > > fixed I thought > > I > > > would describe it here for the record. I have a cc file which had a > > single > > > system include (#include <vector>) and the include for its .hh file > > > (#include "base/loader/loader.hh"), but they were in the wrong > > > order, system and then .hh. The style checker correctly complained > > > about the > > order > > > and offered to fix it, but when I said yes it didn't actually change > > > anything or print any messages. FYI in case somebody wants to > > investigate. > > > > > > Gabe > > > > > _______________________________________________ > > gem5-dev mailing list > > gem5-dev@gem5.org > > https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fm5sim > > .org%2Fmailman%2Flistinfo%2Fgem5-dev&data=02%7C01%7Canz37%40pitt.e > > du%7C482071dff3564cce9b4808d6d0364833%7C9ef9f489e0a04eeb87cc3a526112fd > > 0d%7C1%7C0%7C636925328891312282&sdata=wkeXznipig94J2ytrXFAhWJhPQDZ > > lxxSdQ4f6Oa18dI%3D&reserved=0 > _______________________________________________ > gem5-dev mailing list > gem5-dev@gem5.org > > https://nam05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fm5sim.org%2Fmailman%2Flistinfo%2Fgem5-dev&data=02%7C01%7Canz37%40pitt.edu%7C482071dff3564cce9b4808d6d0364833%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C636925328891312282&sdata=wkeXznipig94J2ytrXFAhWJhPQDZlxxSdQ4f6Oa18dI%3D&reserved=0 > _______________________________________________ > gem5-dev mailing list > gem5-dev@gem5.org > http://m5sim.org/mailman/listinfo/gem5-dev _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev