mirror of
https://github.com/golang/go.git
synced 2026-06-27 03:11:23 +00:00
cmd/go: add constant for requires simplification
This change introduces a new constant `SimplifyRequireVersion` in preparation for making go.mod files to have at most two require blocks (one for direct and one for indirect dependencies) when the go version is 1.27 or higher. For #56471. Change-Id: I0dab5c93815dc0dfc5596ff8af00d364a716ae89 Reviewed-on: https://go-review.googlesource.com/c/go/+/738740 Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
58efaf3859
commit
922abf576d
1 changed files with 6 additions and 1 deletions
|
|
@ -36,11 +36,16 @@ const (
|
|||
// the module graph; see https://golang.org/ref/mod#graph-pruning.
|
||||
ExplicitIndirectVersion = "1.17"
|
||||
|
||||
// separateIndirectVersion is the Go version at which
|
||||
// SeparateIndirectVersion is the Go version at which
|
||||
// "// indirect" dependencies are added in a block separate from the direct
|
||||
// ones. See https://golang.org/issue/45965.
|
||||
SeparateIndirectVersion = "1.17"
|
||||
|
||||
// SimplifyRequireVersion is the Go version at which
|
||||
// require blocks are simplified to always have at most two sections
|
||||
// (one direct, one indirect). See https://go.dev/issue/56471.
|
||||
SimplifyRequireVersion = "1.27"
|
||||
|
||||
// tidyGoModSumVersion is the Go version at which
|
||||
// 'go mod tidy' preserves go.mod checksums needed to build test dependencies
|
||||
// of packages in "all", so that 'go test all' can be run without checksum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue