[Mesa-dev] [PATCH 02/11] nir: Add a pass-running infastructure

Ian Romanick idr at freedesktop.org
Fri Oct 30 13:49:19 PDT 2015


On 10/28/2015 09:26 PM, Ilia Mirkin wrote:
> On Wed, Oct 28, 2015 at 8:04 PM, Ian Romanick <idr at freedesktop.org> wrote:
>> People often complain about the way that open-source projects are so nit
>> picky about coding standards.  It's a necessary survival tactic.  Mesa
>> is 22 years old.  It has had dozens of contributors.  Imagine how much
> 
> There are like 10 different areas in mesa and they all have their own
> styles. Each area is often strict on its style, but that style is
> strictly different from other areas. 3-space indent, 4-space tabs,
> 8-space tabs, indent next line to some (imho) weird rule, case
> indented from switch, case not indented. Not to mention the places
> that are one line with tabs, one without, one with some tabs and some
> spaces, etc.

I know, and it's terrible.  Every time I do some sort of infrastructure
work that requires changes in the r200 driver I have to spend extra
effort to be sure I'm formatting thing the right way for that area.
That's a big part of the reason I don't want it to get worse.

> In past lives, I've often been on the side of "oh noes, fixing it all
> will mess up history", but experience with a few times where I've lost
> that battle(/not cared enough) has taught me that it's not such a big
> deal. Even if you go and change *every single line* in the project,

When we have made style changes or noted inconsistencies, we generally
haven't gone and fixed everything.  This wasn't because of messing up
history.  It has been because going and fixing everything is a lot of
tedious, often time consuming work... and that hasn't been compatible
with people's stuff-to-do:time-to-do-stuff ratio.  It can also making
cherry picking to stable and rebasing pending branches annoying, but
that's generally a minor issue compared to the effort of changing 3,000
files to make style changes.

> it's not that big of a deal. git blame -w ignores whitespace changes,
> and even for more substantial churn all you end up having to do is run
> one extra command in some situations. I find that I write/modify code
> a lot more often than I do git blames. And I spend even more time
> thinking about the code I write, so typing "struct" or anything like
> that is never an issue.
> 
> I would definitely be in favor of doing a major cleanup if some
> baseline rules can be agreed upon.
> 
>   -ilia



More information about the mesa-dev mailing list