Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Consider switching to official rust style (rustfmt zinc) #358

Open
posborne opened this issue Dec 16, 2015 · 10 comments
Open

Consider switching to official rust style (rustfmt zinc) #358

posborne opened this issue Dec 16, 2015 · 10 comments

Comments

@posborne
Copy link
Contributor

Putting out a feeler. I think using the standard style is probably a good idea and makes contributing easier (in addition to making my emacs configuration easier).

https://github.com/rust-lang/rust/tree/master/src/doc/style

rustfmt can probably do a majority of the work, although it still needs some handholding in my experience to prevent it from going in the weeds in edge cases. With cargo install we can be rustfmting in no time.

I don't think there are too many major outstanding PRs that would need to be reworked, so now seems as good a time as any to make the switch if this suggestion is amenable.

@mcoffin
Copy link
Contributor

mcoffin commented Dec 16, 2015

For reference, previous discussion.

TL;DR: This would 🔪 git-blame, but might be worth it.

@posborne
Copy link
Contributor Author

@mcoffin. You're right of course on git blame but I think it probably is worth it. git blame does have options for ignoring whitespace changes (-w) which might be enough to make the reformat less of a big deal (given how often blames are actually performed in practice in my experience). I'd like to think that Zinc has a long, bright future in front of it and reformatting may end up being one of the smaller changes in the grand scheme of things.

I think (and hope?) the cognitive dissonance of a unique style is likely to only increase over time as the standard style becomes more and more standard (e.g. I bet IDEs will not even make much of the style for Rust code configurable).

@mcoffin
Copy link
Contributor

mcoffin commented Dec 16, 2015

Don't get me wrong, I'm all for it. Gonna be some work for somebody though.

And yea... we need to have an RFC party or something...

@bharrisau
Copy link
Contributor

bharrisau commented Dec 16, 2015 via email

@farcaller
Copy link
Member

I'm all in for it, but is rustfmt stable enough now?

@posborne
Copy link
Contributor Author

@farcaller It's pretty good but you still need to look at the diffs to keep things in check. I ran it on a few of my projects the other day with pretty good results.

@mcoffin
Copy link
Contributor

mcoffin commented Dec 16, 2015

you still need to look at the diffs to keep things in check

Touches nose

On a more serious note, I don't know what it does with your macros, but we'd have to watch the ioregs! usages.

@farcaller
Copy link
Member

I want to kill ioreg! though... 🔥

@mcoffin
Copy link
Contributor

mcoffin commented Dec 16, 2015

I want to kill ioreg! though... 🔥

Like I said earlier and on IRC, we need to have an RFC party and make some tech decisions so that we can start working towards common goals.

@farcaller
Copy link
Member

Makes sense. Let me fire up a dedicated ticket for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants