Go fmt changes in Go1.19

486 views
Skip to first unread message

thebroke...@gmail.com

unread,
May 19, 2022, 2:13:20 PM5/19/22
to golang-dev
I've been running the Go1.19 formatter on my code, and I'm seeing quite a lot of code churn. This is fine since I support of the godoc changes that caused this churn.

Given that we're already going to cause significant code churn in Go1.19, that got me thinking whether we should address a number of the smaller `go fmt` bugs and quirks that have been filed over the years. For many of those issues, it was commonly acknowledged that the `go fmt` behavior should be changed, but that we didn't want to cause unnecessary code churn. If code churn is going to happen anyways, then perhaps this release is the best time to fix those?

I realize that it's after the code freeze, so we may unfortunately be unable to do anything more.

Thoughts?
JT

Russ Cox

unread,
May 26, 2022, 9:57:51 AM5/26/22
to thebroke...@gmail.com, golang-dev
Hopefully you are only seeing comment churn, not code churn.
And also the comment churn is in service of bringing new, important
functionality, namely richer doc comments. Most of the other gofmt
issues are only about spacing, which doesn't bring the same level
of benefits to the broader ecosystem.

In any event, at this point it is too late to be contemplating further changes
to the formatter in Go 1.19, as you suspected.

Best,
Russ


--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/a5179ece-60e5-4a71-b1f7-fa8871c35cc5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages