Граф коммитов

4 Коммитов

Автор SHA1 Сообщение Дата
Tim King 7f348c7a4c internal/versions: updates the meaning of FileVersions.
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#65612
Fixes golang/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>
2024-02-28 22:27:48 +00:00
Tim King ea9e542160 internal/versions: fix package to accept go1.21.0-bigcorp
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>
2024-02-14 22:17:06 +00:00
Tim King 134390ab38 internal/versions: strip "go" prefix
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>
2023-11-13 23:01:32 +00:00
Tim King 3b6876f0e6 internal/versions: add a new versions package
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>
2023-11-10 18:46:13 +00:00