_content/doc: document new cmd/go GODEBUG behavior (update release notes) Also, minor cosmetic changes elsewhere in the doc. For golang/go#79422. For golang/go#78779. Change-Id: Ib62e4b017e0f0d58cf808f13f61a8edd915fdb7c Reviewed-on: https://go-review.googlesource.com/c/website/+/786260 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org> Auto-Submit: Robert Griesemer <gri@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Robert Griesemer <gri@google.com>
diff --git a/_content/doc/go1.27.md b/_content/doc/go1.27.md index 3dfb43a..6c66d92 100644 --- a/_content/doc/go1.27.md +++ b/_content/doc/go1.27.md
@@ -16,7 +16,7 @@ <!-- go.dev/issue/9859 --> -A key in a [struct literal](/ref/spec#Composite_literals) may be any +A key in a [struct literal](/ref/spec#Composite_literals) may now be any valid [field selector](/issue/9859) for the struct type, not just a (top-level) field name of the struct. @@ -29,7 +29,7 @@ the namespace of a particular data type where before one had to declare such functions with a scope of the entire package. Note that methods of [interfaces](/ref/spec#Interface_types) may not declare -type parameters nor can interface types be implemented by generic methods. +type parameters nor can interface methods be implemented by generic methods. <!-- go.dev/issue/77245 --> @@ -61,6 +61,18 @@ The existing `fmtappendf` analyzer was removed due to stylistic concerns. <!-- #77581 --> The existing `waitgroup` analyzer was renamed to `waitgroupgo` to avoid ambiguity. +<!-- go.dev/issue/79422 --> + +Starting with the Go 1.27 tool chain, the `go` command now recognizes a `GODEBUG` setting +for which support was removed (such as `asynctimerchan`, see below) if it appears in `go.mod` +files (`go debug` entries) and `.go` source files (`//go:debug` comments). +It accepts these settings if they are set to the final default value established before +the setting was removed. +If they are set to an old value, the `go` command will fail. +This change is in the spirit of the [Go 1 compatibility guarantee](/doc/go1compat) +and allows existing programs that set supported `GODEBUG` settings to continue to +build and run without changes even when the respective setting support has been removed. + <!-- go.dev/issue/56471 --> For modules specifying `go 1.27` or later in their `go.mod` file, `go mod tidy` @@ -101,9 +113,9 @@ <!-- CL 781580 --> -The `asynctimerchan` GODEBUG setting (added in [Go 1.23](/doc/godebug#go-123)) +The `asynctimerchan` `GODEBUG` setting (added in [Go 1.23](/doc/godebug#go-123)) has been removed permanently. Channels created by package [time](https://pkg.go.dev/time) -are now always unbuffered (synchronous), irrespective of GODEBUG settings. +are now always unbuffered (synchronous), irrespective of `GODEBUG` settings. ### Faster memory allocation @@ -200,7 +212,7 @@ <!-- 6-stdlib/99-minor/crypto/tls/tlsmlkem.md --> Post-quantum hybrid key exchanges can now be explicitly enabled in -[`Config.CurvePreferences`](/pkg/crypto/tls#Config.CurvePreferences) even if the `tlsmlkem=0` or `tlssecpmlkem=0` GODEBUG +[`Config.CurvePreferences`](/pkg/crypto/tls#Config.CurvePreferences) even if the `tlsmlkem=0` or `tlssecpmlkem=0` `GODEBUG` options are used. Those options were always meant to only apply to the default set used when [`Config.CurvePreferences`](/pkg/crypto/tls#Config.CurvePreferences) is nil. @@ -283,10 +295,10 @@ <!-- 6-stdlib/99-minor/go/types/76472.md --> <!-- CL 736441 --> -The `gotypesalias` GODEBUG setting (added in [Go 1.22](/doc/godebug#go-122)) +The `gotypesalias` `GODEBUG` setting (added in [Go 1.22](/doc/godebug#go-122)) has been removed permanently and the package [go/types](https://pkg.go.dev/go/types) now always produces an [Alias](https://pkg.go.dev/go/types#Alias) type node for -[alias declarations](/ref/spec#Alias_declarations) irrespective of GODEBUG settings. +[alias declarations](/ref/spec#Alias_declarations) irrespective of `GODEBUG` settings. <!-- 6-stdlib/99-minor/go/types/79287.md --> <!-- nothing to see here but some String methods -->