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

Fix #2104: fmt incorrectly using 1-indexing for columns #2106

Merged
merged 2 commits into from
Mar 19, 2024

Conversation

jkelleyrtp
Copy link
Member

@jkelleyrtp jkelleyrtp commented Mar 19, 2024

Two issues in autofmt:

  • Incorrectly using 1-indexing for columns when we should be doing 0-indexing
  • Comments were being written for attributes even when those comments did not belong to those attributes. We now double check who owns the whitespace before writing it out

While doing this overhaul, I also finally ditched the prettier-please crate for the original prettyplease crate, meaning we have 1 fewer vendored crates to maintain (bringing that down the total down to 0!). This does lead to slightly less performance (since we can't make a File out of a borrowed Expr, but should be imperceptible in practice.

@jkelleyrtp jkelleyrtp requested a review from ealmloff March 19, 2024 01:11
@jkelleyrtp jkelleyrtp merged commit d8942a2 into main Mar 19, 2024
8 of 9 checks passed
@jkelleyrtp jkelleyrtp deleted the jk/autofmt-fixes branch March 19, 2024 01:23
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.

[[email protected]] dx fmt breaks file
1 participant