|
1 | 1 | # Changelog
|
2 | 2 |
|
| 3 | +## [v0.5.0] - 2023-04-09 |
| 4 | + |
| 5 | +This release is based on Go 1.20's gofmt, and requires Go 1.19 or later. |
| 6 | + |
| 7 | +The biggest change in this release is that we now vendor copies of the packages |
| 8 | +`go/format`, `go/printer`, and `go/doc/comment` on top of `cmd/gofmt` itself. |
| 9 | +This allows for each gofumpt release to format code in exactly the same way |
| 10 | +no matter what Go version is used to build it, as Go versions can change those |
| 11 | +three packages in ways that alter formatting behavior. |
| 12 | + |
| 13 | +This vendoring adds a small amount of duplication when using the |
| 14 | +`mvdan.cc/gofumpt/format` library, but it's the only way to make gofumpt |
| 15 | +versions consistent in their behavior and formatting, just like gofmt. |
| 16 | + |
| 17 | +The jump to Go 1.20's `go/printer` should also bring a small performance |
| 18 | +improvement, as we contributed patches to make printing about 25% faster: |
| 19 | + |
| 20 | +* https://go.dev/cl/412555 |
| 21 | +* https://go.dev/cl/412557 |
| 22 | +* https://go.dev/cl/424924 |
| 23 | + |
| 24 | +The following changes are included as well: |
| 25 | + |
| 26 | +* Skip `testdata` dirs by default like we already do for `vendor` - [#260] |
| 27 | +* Avoid inserting newlines incorrectly in some func signatures - [#235] |
| 28 | +* Avoid joining some comments with the previous line - [#256] |
| 29 | +* Fix `gofumpt -version` for release archives - [#253] |
| 30 | + |
3 | 31 | ## [v0.4.0] - 2022-09-27
|
4 | 32 |
|
5 | 33 | This release is based on Go 1.19's gofmt, and requires Go 1.18 or later.
|
@@ -111,6 +139,9 @@ those building programs with gofumpt.
|
111 | 139 | Finally, this release adds the `-version` flag, to print the tool's own version.
|
112 | 140 | The flag will work for "master" builds too.
|
113 | 141 |
|
| 142 | +[v0.5.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.5.0 |
| 143 | +[#212]: https://github.com/mvdan/gofumpt/issues/212 |
| 144 | + |
114 | 145 | [v0.4.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.4.0
|
115 | 146 | [#212]: https://github.com/mvdan/gofumpt/issues/212
|
116 | 147 | [#217]: https://github.com/mvdan/gofumpt/issues/217
|
|
0 commit comments