Skip to content
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

Use stable rustfmt #2168

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Use stable rustfmt #2168

merged 1 commit into from
Jun 25, 2024

Conversation

djmitche
Copy link
Collaborator

This uses the rustfmt from the stable toolchain, instead of nightly. At the moment, nightly's rustfmt is nonfunctional, but in general we don't need bleeding-edge formatting (and in fact, the more often formatting changes, the more often we'll get spurious failures on PRs, as we are today).

Fixes #2165.

@djmitche djmitche requested a review from qwandor June 24, 2024 23:55
@djmitche djmitche enabled auto-merge (squash) June 24, 2024 23:56
@djmitche
Copy link
Collaborator Author

Once this is merged, I think we can rebase a bunch of other open PRs and land them.

@djmitche djmitche merged commit ab5e900 into google:main Jun 25, 2024
33 checks passed
@mgeisler
Copy link
Collaborator

mgeisler commented Jul 3, 2024

in general we don't need bleeding-edge formatting (and in fact, the more often formatting changes, the more often we'll get spurious failures on PRs, as we are today).

This is not 100% true: we use unstable features in our rustfmt.toml file:

# Please use a nightly rustfmt for these settings.
imports_granularity = "module"
wrap_comments = true

Luckily, both of these settings are no-ops with a stable rustfmt, as long as people wrap things nicely by hand 😄

We could instead pin the nightly version used in CI: you're right that we don't want the "latest and greatest" when it comes to formatting, we just want a consistent result and some useful features as well.

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

Successfully merging this pull request may close these issues.

dprint fmt failing
3 participants