Skip to content

Commit 83bceaf

Browse files
committed
internal/versions: remove use of go/versions
Removes the guarded use of "go/versions" when on GoVersions >=1.22. Instead always uses the internal fork. Fixes golang/go#64490 Updates golang/go#32345 Change-Id: I22636c52ddbb89c72edbd0ed65ab6b9a394d70d1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/550395 Reviewed-by: Bryan Mills <bcmills@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Run-TryBot: Tim King <taking@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
1 parent 261fa1a commit 83bceaf

File tree

2 files changed

+6
-41
lines changed

2 files changed

+6
-41
lines changed

internal/versions/versions_go121.go renamed to internal/versions/versions.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build !go1.22
6-
// +build !go1.22
7-
85
package versions
96

7+
// Note: If we use build tags to use go/versions when go >=1.22,
8+
// we run into go.dev/issue/53737. Under some operations users would see an
9+
// import of "go/versions" even if they would not compile the file.
10+
// For example, during `go get -u ./...` (go.dev/issue/64490) we do not try to include
11+
// For this reason, this library just a clone of go/versions for the moment.
12+
1013
// Lang returns the Go language version for version x.
1114
// If x is not a valid version, Lang returns the empty string.
1215
// For example:

internal/versions/versions_go122.go

-38
This file was deleted.

0 commit comments

Comments
 (0)