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

add scalafmt #634

Merged
merged 23 commits into from Nov 21, 2017
Merged

add scalafmt #634

merged 23 commits into from Nov 21, 2017

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented Nov 21, 2017

successor to the ill-fated #578

fyi @olafurpg

@SethTisue
Copy link
Member Author

SethTisue commented Nov 21, 2017

@SethTisue SethTisue mentioned this pull request Nov 21, 2017
@SethTisue SethTisue self-assigned this Nov 21, 2017
@SethTisue SethTisue merged commit 6ad2065 into scala:2.12.x Nov 21, 2017
@SethTisue SethTisue deleted the add-scalafmt-spaces branch November 21, 2017 14:49
@olafurpg
Copy link
Member

Cool! Thanks for getting this working @SethTisue

My plan is to make scalafmt v2 be a proper tree printer using scalameta v2, my WIP is here https://github.com/olafurpg/scala-syntax Early results look promising (5x speedup and prettier output!) but still need more time to handle comments before merging it into scalafmt repo.

@SethTisue
Copy link
Member Author

sounds good — although I did manage to get this working (perhaps more as a testament to my own cussedness than any kind of sensible cost/benefit analysis...) it would be nice to drop the Scalameta 1 stuff again before toooo much longer

@olafurpg
Copy link
Member

The situation is quite bad since scalafmt currently hasn't benefited from scalameta parser improvements since april this year. I made a mistake to LGTM too big breaking changes in scalameta v2. Having a proper tree printer will not only enable scalafmt to upgrade the scalameta dep but also enable syntax preserving tree transforms in scalafix, which is very exciting. I'll keep you posted on progress.

@olafurpg
Copy link
Member

Good news, scalafmt is now on the latest scalameta version 🎉 Additionally, scalafmt no longer depends on the scalameta/paradise compiler plugin.

The upgrade from v1.8 to v2.0 only took ~1hr to finish scalameta/scalafmt#1170, but the removal of scalameta/paradise was harder scalameta/scalafmt#1145

@SethTisue
Copy link
Member Author

Good news, scalafmt is now on the latest scalameta version 🎉 Additionally, scalafmt no longer depends on the scalameta/paradise compiler plugin.

@olafurpg thanks, this resulted in a nice community build simplification: 9e7cb40

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.

None yet

2 participants