From c18bffa1b03c9346f0dd1af830b09979e63c7b5f Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Sun, 16 Feb 2025 02:16:29 -0500 Subject: [PATCH] all: delete redundant //go:debug gotypesalias=1 directives [generated] The module's go directive is >= 1.23 now, so these files no longer have any effect. Also drop the outdated comment in go.mod. For golang/go#69772. [git-generate] find . -type f -name gotypesalias.go -exec rm {} + sed -i '' 's| // => default GODEBUG has gotypesalias=0||' go.mod Change-Id: Id0fa54f89695991de6c8721aadecfd587826d158 Reviewed-on: https://go-review.googlesource.com/c/tools/+/650095 Reviewed-by: Cherry Mui Auto-Submit: Dmitri Shuralyov Reviewed-by: Funda Secgin Reviewed-by: Robert Findley LUCI-TryBot-Result: Go LUCI --- cmd/bundle/gotypesalias.go | 12 ------------ cmd/callgraph/gotypesalias.go | 12 ------------ cmd/deadcode/gotypesalias.go | 12 ------------ cmd/eg/gotypesalias.go | 12 ------------ cmd/godex/gotypesalias.go | 12 ------------ cmd/godoc/gotypesalias.go | 12 ------------ cmd/goimports/gotypesalias.go | 12 ------------ cmd/gomvpkg/gotypesalias.go | 12 ------------ cmd/gotype/gotypesalias.go | 12 ------------ cmd/ssadump/gotypesalias.go | 12 ------------ cmd/stringer/gotypesalias.go | 12 ------------ go.mod | 2 +- go/analysis/passes/defers/cmd/defers/gotypesalias.go | 12 ------------ .../cmd/fieldalignment/gotypesalias.go | 12 ------------ .../passes/findcall/cmd/findcall/gotypesalias.go | 12 ------------ .../passes/httpmux/cmd/httpmux/gotypesalias.go | 12 ------------ .../ifaceassert/cmd/ifaceassert/gotypesalias.go | 12 ------------ .../passes/lostcancel/cmd/lostcancel/gotypesalias.go | 12 ------------ .../passes/nilness/cmd/nilness/gotypesalias.go | 12 ------------ go/analysis/passes/shadow/cmd/shadow/gotypesalias.go | 12 ------------ .../stringintconv/cmd/stringintconv/gotypesalias.go | 12 ------------ .../passes/unmarshal/cmd/unmarshal/gotypesalias.go | 12 ------------ .../unusedresult/cmd/unusedresult/gotypesalias.go | 12 ------------ go/packages/gopackages/gotypesalias.go | 12 ------------ go/packages/internal/nodecount/gotypesalias.go | 12 ------------ go/types/internal/play/gotypesalias.go | 12 ------------ 26 files changed, 1 insertion(+), 301 deletions(-) delete mode 100644 cmd/bundle/gotypesalias.go delete mode 100644 cmd/callgraph/gotypesalias.go delete mode 100644 cmd/deadcode/gotypesalias.go delete mode 100644 cmd/eg/gotypesalias.go delete mode 100644 cmd/godex/gotypesalias.go delete mode 100644 cmd/godoc/gotypesalias.go delete mode 100644 cmd/goimports/gotypesalias.go delete mode 100644 cmd/gomvpkg/gotypesalias.go delete mode 100644 cmd/gotype/gotypesalias.go delete mode 100644 cmd/ssadump/gotypesalias.go delete mode 100644 cmd/stringer/gotypesalias.go delete mode 100644 go/analysis/passes/defers/cmd/defers/gotypesalias.go delete mode 100644 go/analysis/passes/fieldalignment/cmd/fieldalignment/gotypesalias.go delete mode 100644 go/analysis/passes/findcall/cmd/findcall/gotypesalias.go delete mode 100644 go/analysis/passes/httpmux/cmd/httpmux/gotypesalias.go delete mode 100644 go/analysis/passes/ifaceassert/cmd/ifaceassert/gotypesalias.go delete mode 100644 go/analysis/passes/lostcancel/cmd/lostcancel/gotypesalias.go delete mode 100644 go/analysis/passes/nilness/cmd/nilness/gotypesalias.go delete mode 100644 go/analysis/passes/shadow/cmd/shadow/gotypesalias.go delete mode 100644 go/analysis/passes/stringintconv/cmd/stringintconv/gotypesalias.go delete mode 100644 go/analysis/passes/unmarshal/cmd/unmarshal/gotypesalias.go delete mode 100644 go/analysis/passes/unusedresult/cmd/unusedresult/gotypesalias.go delete mode 100644 go/packages/gopackages/gotypesalias.go delete mode 100644 go/packages/internal/nodecount/gotypesalias.go delete mode 100644 go/types/internal/play/gotypesalias.go diff --git a/cmd/bundle/gotypesalias.go b/cmd/bundle/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/bundle/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/callgraph/gotypesalias.go b/cmd/callgraph/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/callgraph/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/deadcode/gotypesalias.go b/cmd/deadcode/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/deadcode/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/eg/gotypesalias.go b/cmd/eg/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/eg/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/godex/gotypesalias.go b/cmd/godex/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/godex/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/godoc/gotypesalias.go b/cmd/godoc/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/godoc/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/goimports/gotypesalias.go b/cmd/goimports/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/goimports/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/gomvpkg/gotypesalias.go b/cmd/gomvpkg/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/gomvpkg/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/gotype/gotypesalias.go b/cmd/gotype/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/gotype/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/ssadump/gotypesalias.go b/cmd/ssadump/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/ssadump/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/cmd/stringer/gotypesalias.go b/cmd/stringer/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/cmd/stringer/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go.mod b/go.mod index 9edfc58936d..bc7636b4cf8 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module golang.org/x/tools -go 1.23.0 // => default GODEBUG has gotypesalias=0 +go 1.23.0 require ( github.com/google/go-cmp v0.6.0 diff --git a/go/analysis/passes/defers/cmd/defers/gotypesalias.go b/go/analysis/passes/defers/cmd/defers/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/defers/cmd/defers/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/fieldalignment/cmd/fieldalignment/gotypesalias.go b/go/analysis/passes/fieldalignment/cmd/fieldalignment/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/fieldalignment/cmd/fieldalignment/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/findcall/cmd/findcall/gotypesalias.go b/go/analysis/passes/findcall/cmd/findcall/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/findcall/cmd/findcall/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/httpmux/cmd/httpmux/gotypesalias.go b/go/analysis/passes/httpmux/cmd/httpmux/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/httpmux/cmd/httpmux/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/ifaceassert/cmd/ifaceassert/gotypesalias.go b/go/analysis/passes/ifaceassert/cmd/ifaceassert/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/ifaceassert/cmd/ifaceassert/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/lostcancel/cmd/lostcancel/gotypesalias.go b/go/analysis/passes/lostcancel/cmd/lostcancel/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/lostcancel/cmd/lostcancel/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/nilness/cmd/nilness/gotypesalias.go b/go/analysis/passes/nilness/cmd/nilness/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/nilness/cmd/nilness/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/shadow/cmd/shadow/gotypesalias.go b/go/analysis/passes/shadow/cmd/shadow/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/shadow/cmd/shadow/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/stringintconv/cmd/stringintconv/gotypesalias.go b/go/analysis/passes/stringintconv/cmd/stringintconv/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/stringintconv/cmd/stringintconv/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/unmarshal/cmd/unmarshal/gotypesalias.go b/go/analysis/passes/unmarshal/cmd/unmarshal/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/unmarshal/cmd/unmarshal/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/analysis/passes/unusedresult/cmd/unusedresult/gotypesalias.go b/go/analysis/passes/unusedresult/cmd/unusedresult/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/analysis/passes/unusedresult/cmd/unusedresult/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/packages/gopackages/gotypesalias.go b/go/packages/gopackages/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/packages/gopackages/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/packages/internal/nodecount/gotypesalias.go b/go/packages/internal/nodecount/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/packages/internal/nodecount/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1). diff --git a/go/types/internal/play/gotypesalias.go b/go/types/internal/play/gotypesalias.go deleted file mode 100644 index 288c10c2d0a..00000000000 --- a/go/types/internal/play/gotypesalias.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.23 - -//go:debug gotypesalias=1 - -package main - -// Materialize aliases whenever the go toolchain version is after 1.23 (#69772). -// Remove this file after go.mod >= 1.23 (which implies gotypesalias=1).