Stream: t-compiler

Topic: rustc rustfmt PR


varkor (Jan 04 2019 at 12:43, on Zulip):

this seems like a significant enough change that it's good to be aware of it: https://github.com/rust-lang/rust/pull/57318

csmoe (Jan 04 2019 at 13:23, on Zulip):

omg, for someone who has a large pending PR, rebasing disaster is coming :scream:

varkor (Jan 04 2019 at 13:38, on Zulip):

in theory, as long as we've established the rustfmt configurations, running rustfmt on our own PR will address that problem

varkor (Jan 04 2019 at 13:38, on Zulip):

but I haven't actually attempted it yet

nikomatsakis (Jan 04 2019 at 14:55, on Zulip):

I've done that before and it works pretty well

nikomatsakis (Jan 04 2019 at 14:55, on Zulip):

basically rustfmting each commit and then rebasing

Zoxc (Jan 04 2019 at 14:58, on Zulip):

I want a script to rustfmt a branch before merging this

varkor (Jan 04 2019 at 15:00, on Zulip):

I definitely want this to be done (at least tested, and ideally reformatted) automatically by tidy before merging it

varkor (Jan 04 2019 at 15:01, on Zulip):

otherwise there are going to be PRs merged that don't obey the formatting rules afterwards, which will have to be reformatted again

Björn Steinbrink (Jan 04 2019 at 15:56, on Zulip):

@Zoxc

git rebase --exec 'rustfmt $(git diff --name-only --no-renames --diff-filter=AM HEAD^!); git commit --amend --no-edit -a' master

should do

blitzerr (Jan 04 2019 at 19:48, on Zulip):

Is this the flag day CR @nikomatsakis was referring to ? This is a good step @simulacrum but we would need something like git-clang-format functionality for RustFmt so that we can just format the patch we are working on and not the entire file(s).

blitzerr (Jan 04 2019 at 19:51, on Zulip):

Also, can we add a commit message to the PR @simulacrum ?
ls -lR | egrep '\.rs$' | wc -l 13629
Running that command gave me that ~13600 files but this patch seems to touch 1125 of them (my repo might not be updated). So, the rest files are formatted as per the RustFmt rules ?

nikomatsakis (Jan 04 2019 at 19:52, on Zulip):

@blitzerr well you can just reformat the whole repo actually and when you rebase git will sort out the diffs -- but it would prob best to wait until the PR lands

nikomatsakis (Jan 04 2019 at 19:52, on Zulip):

at least that's been my past experience

simulacrum (Jan 04 2019 at 21:33, on Zulip):

The earliest we'll land it is in ~2 weeks and I think we might push it off another cycle or so (hopefully integrate it with CI simultaneously)

simulacrum (Jan 04 2019 at 21:33, on Zulip):

I was hoping to get that all done over holidays but it didn't quite happen unfortunately -- only got the license PR landed

Last update: Nov 20 2019 at 02:35UTC