cmd/go: allow defaults for removed GODEBUG settings
With this change, removed GODEBUG settings may still be used by clients provided that they don't use an old (non-final) value for the setting. For instance, with Go 1.27, the gotypesalias setting will be removed. It's old value was "0"; the new default behavior is indicated by any non-"0" value (usually "1"). Programs that set //go:debug gotypesalias=1 (or the respective godebug gotypesalias=1 in a .mod file) and thus rely on the new final behavior will keep building unchanged. Removing the setting is encouraged but not required. But programs that use an old setting (//go:debug gotypesalias=0 in this example) will fail to build. While at it, add tlskyber to the set of removed GODEBUG settings (was missed when it was removed/renamed - thanks to Mateusz Poliwczak for noticing). Add test cases verifying the new behavior. Fixes #79422. For #76163. Change-Id: I0307fec7c0a5ce776cfdd7b95db9bd76295ba7f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/784221 Reviewed-by: Ian Alexander <jitsu@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Auto-Submit: Robert Griesemer <gri@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
R
Robert Griesemer committed
015343854b5d9e2829481df30dbcae2ca6682d25
Parent: 33001a6
Committed by Gopher Robot <gobot@golang.org>
on 6/1/2026, 11:11:01 PM