CL 607955 is changing the behavior of "//go:build" file versions.
Before, file versions did not apply if go version was set for the
package, but after CL 6079055, the package's go version does not
influence whether the file version is applied: max(fileVersion, go1.21)
will always be applied.
Once CL 607955 is released in a go 1.23 minor release, we can update the
test to require go1.23 and test for the new behavior (though it would
fail for users building with a version of go older than the minor
release with the behavior update).
For golang/go#68658
Change-Id: I99d39ce108274edf401d861e553ad923b508f936
Reviewed-on: https://go-review.googlesource.com/c/tools/+/608797
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Report invalid Go versions within build tags. Additionally reports
likely misspellings of Go version tags.
Fixesgolang/go#64127
Change-Id: I9b698c94c7da29aafbe45b4c90d58c0bfe8efa1d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/597576
Reviewed-by: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I70517b1b17b4ee3243e85de2701195a2531d67e5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/586335
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
For Go >=1.22, FileVersions returns an unknown [invalid] Future version
when the file versions would be invalid. This better matches
go/types.
For Go <=1.21, FileVersions returns either the runtime.Version()
or the Future version.
Adds AtLeast and Before for doing comparisons with Future.
Updates golang/go#65612Fixesgolang/go#66007
Change-Id: I93ff1681b0f9117765614a20d82642749597307c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/567635
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Adds support for suffixes to x/tools copy of go/version.
Brings in go.dev/cl/559796.
Updates golang/go#65061
Change-Id: Iaa0c98a73d8ddd8a42f0c4d3df7d4d79eb7aeb0a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/562838
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>
Reviewed-by: Bryan Mills <bcmills@google.com>
Removes the guarded use of "go/versions" when on GoVersions >=1.22.
Instead always uses the internal fork.
Fixesgolang/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>
Strip "go" prefix before using gover clone used for Go versions before 1.22.
Change-Id: I2bc3707c839871a52c9dc2f405614c1b642e82a2
Reviewed-on: https://go-review.googlesource.com/c/tools/+/542095
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Run-TryBot: Tim King <taking@google.com>
Adds a new versions package to provide x/tools a way to
deal with new GoVersion() and FileVersions API from go/types
and the new go/version standard library.
This provides a stable API until 1.26.
Updates golang/go#63374
Updates golang/go#62605
Change-Id: I4de54df00ea0f4363c0383cbdc917186277bfd0a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/533056
Run-TryBot: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>