rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

subtree-push nightly-2025-10-07

Open jieyouxu opened this issue 3 months ago • 15 comments

Bumping the toolchain version as part of a git subtree push.

current toolchain (nightly-2025-04-02):

  • 1.88.0-nightly (e2014e876 2025-04-01)

latest toolchain (nightly-2025-10-07):

  • 1.92.0-nightly (f6aa851db 2025-10-07)

Review remarks

I tried my best to mimic prior rustfmt syncs (e.g. https://github.com/rust-lang/rustfmt/pull/6531), and tried to piece this together based on clippy's subtree sync advice.

For the merge commit itself, I had to fix two merge conflicts:

  1. src/types.rs (related to dyn* unstable feature removal cf. https://github.com/rust-lang/rust/pull/143036), and
  2. src/closures.rs (trivial import conflict).

As far as I can tell, rustfmt repo does not have any kind of auto toolchain bump tooling, so I created the last rust-toolchain bump commit (08586bba8e66b73280d16739bb8f80a14a35e081) manually.

I also had to:

  • Fix a non-trivial semantic merge conflicts related to cfg_match! changes that are present in this repo which are not present in the tree in r-l/r... So in some sense the two trees seem to have diverged a bit?
  • Fix a broken test that had invalid (AFAIK) test headers (using = for the key-value separator instead of :) and a missing // rustfmt-edition: 2024 test header.
  • Bump some deps in Cargo.lock (dirs update on the r-l/r side).

jieyouxu avatar Oct 08 '25 11:10 jieyouxu

~~No this isn't right, the earliest commit is too early 🤔~~ EDIT: no wait, that's commit date, not merge date.

jieyouxu avatar Oct 08 '25 11:10 jieyouxu

Ah, non-trivial merge conflicts.

jieyouxu avatar Oct 08 '25 11:10 jieyouxu

Oh, I literally did the exact same thing just now! https://github.com/rust-lang/rustfmt/pull/6682 👀

shulaoda avatar Oct 08 '25 12:10 shulaoda

  • Fix a non-trivial semantic merge conflicts related to cfg_match! changes that are present in this repo which are not present in the tree in r-l/r... So in some sense the two trees seem to have diverged a bit?

Yes, and will reconverge when you sync back up. Typically you do not want there to be a lot of time to have passed between a sync and merging new PRs to avoid this problem. Clippy does a sync every 2-3 weeks which seems to work okay.

Manishearth avatar Oct 08 '25 15:10 Manishearth

I am also happy to do some interim reviews to help with the capacity

fee1-dead avatar Oct 08 '25 15:10 fee1-dead

I don't have bandwidth for maintaining rustfmt in addition to what I'm already maintaining, but can help with smaller cursory reviews as well in the interim if that's needed.

jieyouxu avatar Oct 08 '25 15:10 jieyouxu

Kicked off the Diff-Check

ytmimi avatar Oct 08 '25 20:10 ytmimi

Looks like something impacted import ordering in rustc.

Manishearth avatar Oct 08 '25 21:10 Manishearth

I'll review the diff more carefully a little later to see if I can figure out what's going on similar to what I did in https://github.com/rust-lang/rustfmt/pull/6531#issuecomment-2771299604

ytmimi avatar Oct 08 '25 21:10 ytmimi

I didn't have as much time as I thought to dig into the formatting diff yesterday. I'd like to review the changes carefully before we merge any subtree-push so that we have a clear understand on where all the changes are coming from. I likely won't have much time to look into this until early next week.

ytmimi avatar Oct 09 '25 18:10 ytmimi

Yeah sounds good. No rush :)

jieyouxu avatar Oct 09 '25 23:10 jieyouxu

W.r.t. Diff-Check: Did something get messed up with version="Two" and the style edition changes? All the diffs I am seeing look like stuff related to sorting and version="One" stuff like x.0.0 being reformatted back to x.0 .0

fee1-dead avatar Oct 23 '25 18:10 fee1-dead

@fee1-dead It's possible that there's some sort of mismatch here. I know we need to update the Diff-Check to pass the style-edition instead of the old version config (right now version=Two should be synonymous with style-edition=2024). That might helps us get a better comparison. It's possible that we're seeing a false positive here.

We could try to update the Diff-Check job to take a style_edition parameter and pass that to each binary via the --style-edition option in the CLI

ytmimi avatar Oct 23 '25 18:10 ytmimi

(Let me know if you would like me to fix the merge conflict with a force-push, have not done so to avoid making it annoying to review.)

jieyouxu avatar Oct 30 '25 15:10 jieyouxu

We could try to update the Diff-Check job to take a style_edition parameter and pass that to each binary via the --style-edition option in the CLI

Two PRs (for the existing Diff Check setup):

  1. #6741
  2. (Stacked) #6742

jieyouxu avatar Dec 07 '25 08:12 jieyouxu