this seems like a significant enough change that it's good to be aware of it: https://github.com/rust-lang/rust/pull/57318
omg, for someone who has a large pending PR, rebasing disaster is coming :scream:
in theory, as long as we've established the rustfmt configurations, running rustfmt on our own PR will address that problem
but I haven't actually attempted it yet
I've done that before and it works pretty well
basically rustfmting each commit and then rebasing
I want a script to rustfmt a branch before merging this
I definitely want this to be done (at least tested, and ideally reformatted) automatically by
tidy before merging it
otherwise there are going to be PRs merged that don't obey the formatting rules afterwards, which will have to be reformatted again
git rebase --exec 'rustfmt $(git diff --name-only --no-renames --diff-filter=AM HEAD^!); git commit --amend --no-edit -a' master
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).
Also, can we add a commit message to the PR @simulacrum ?
ls -lR | egrep '\.rs$' | wc -l
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 ?
@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
at least that's been my past experience
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)
I was hoping to get that all done over holidays but it didn't quite happen unfortunately -- only got the license PR landed