-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/gofmt: format regression #25161
Comments
/cc @griesemer |
To clarify the problem: we have several Go versions on CI and users using a mix of Go versions. CI checks that all code is formatted. |
bisected to 542ea5a |
There is some regression in Go formatting on tip. I am constantly getting diffs after formatting. Filed: golang/go#25161
Specific to this example: The "_INFO::" entry is just one char below the threshold. If it were "__INFO::" (for instance), the comment would be aligned. I'm not saying you should change it; but there's a threshold and this code simply is below (or above) it. This is simply "unfortunate" in this case. Regarding the layout algorithm: It could be better, and perhaps in the future we will have a better approach (which is also why we don't want to freeze gofmt). We could trivially change the threshold but that simply moves the problem from this example to another example. More generally: We do not want to freeze gofmt. See #22695 (comment) . I'm going to close this as "unfortunate". |
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
gofmt regression strategy changes in different go release version. In this case, go version under 1.11.x will re-format one line code while go version 1.11.x does nothing. Similar issue occurs in golang/go#25161. So we change some comment position
Differences in code formatting between Go versions cause constant problems for us (golang/go#25161). Currently we support 1.9 and 1.10. Switch to newer 1.11 and 1.12. Fixes google#1013
Differences in code formatting between Go versions cause constant problems for us (golang/go#25161). Currently we support 1.9 and 1.10. Switch to newer 1.11 and 1.12. Fixes #1013
Here is snippet of code:
With 1.10 formatting produces no diff, however with tip I am getting diff:
This breaks our CI.
go version devel +e0d37a33ab Sun Apr 29 09:38:32 2018 +0000 linux/amd64
The text was updated successfully, but these errors were encountered: