Skip to content

Commit fd93f1d

Browse files
committed
add release notes for v0.5.0
1 parent e2f1a6e commit fd93f1d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

CHANGELOG.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

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+
331
## [v0.4.0] - 2022-09-27
432

533
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.
111139
Finally, this release adds the `-version` flag, to print the tool's own version.
112140
The flag will work for "master" builds too.
113141

142+
[v0.5.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.5.0
143+
[#212]: https://github.com/mvdan/gofumpt/issues/212
144+
114145
[v0.4.0]: https://github.com/mvdan/gofumpt/releases/tag/v0.4.0
115146
[#212]: https://github.com/mvdan/gofumpt/issues/212
116147
[#217]: https://github.com/mvdan/gofumpt/issues/217

0 commit comments

Comments
 (0)