-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update rustfmt from 2020-06-02 to 2020-07-26 #76
Conversation
Looks good to me, but I'd like @davepacheco to sign off |
We should probably document our policy and plan here, if for no other reason than I keep forgetting it. From my recollection:
We enforce this in The upshot of all this is: Dropshot is expected to build and pass tests with most Rust versions, but in order to format the code, you need a specific nightly toolchain. @ahl, does all this match your recollection? I feel there must be a better way to deal with this, but we haven't found it yet. What do other projects do? It's annoying to need the nightly toolchain for rustfmt, but if we didn't require it, then it seems like we'd wind up with a tighter coupling to the Rust stable toolchain that people are using. (Maybe that's what most people do? Assume developers on the latest Rust stable?) Plus, losing Regardless, there still is a specific
It'd be great to do that here, but not necessary to merge this PR. |
Mostly just run on stable, and if something changes the format output, push a commit that fixes it. I don't tend to experience a lot of churn in formatting between versions.
You can have more than one commit, where one contains the formatting changes only. |
Yes, @davepacheco, that matches my recollection and understanding. |
We've perhaps just been unlucky, but we've hit quite a few changes that subtly changed formatting in stable. This became annoying because CI would run the most recent nightly, but our dev machines had slightly older nightly builds installed. |
I gather that in this case, there is a specific version required, it's always "whatever's distributed with latest stable", and it's just assumed and not typically documented? I would love to answer the question: how many times would stable rustfmt have reformatted Dropshot in the last year? The easiest way I can think to do this is to download every stable toolchain from 2020, do a fresh clone of Dropshot, reformat it with the first one, then reformat it with each subsequent one in series, saving commits along the way.
I was describing a painful thing that happens during a common workflow, not saying there's not a better way to do it. In my experience, I do a bunch of editing, then I run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To summarize: looks good. We should update the README too. I can do this in a follow up if you prefer.
I'll take a swing! Thanks. |
Moved the rustfmt discussion over to #77. |
The current expected version of
rustfmt
(from thenightly
channel as at2020-06-02
) is not available for illumos systems. By advancing forward to2020-07-26
, we can use a version that appears to be available on all interesting platforms:No source changes appear to be required, at least according to:
Users should be able to get the new toolchain via
rustup install nightly-2020-07-26
.