mirror of
https://github.com/golang/go
synced 2024-11-26 07:38:00 -07:00
cmd/go/internal/modload: remove go116EnableNarrowAll constant
This constant existed in case there was a serious problem with the change to the "all" pattern in Go 1.16 (CL 240623), so that we could roll back the change in behavior by just flipping the constant without introducing merge conflicts elsewhere. Go 1.16 has been out for a while and the new "all" behavior seems fine, so we can jettison this feature flag. For #36460 Change-Id: Ic2730edcee81514d56c7086e11542468eb63c84a Reviewed-on: https://go-review.googlesource.com/c/go/+/303431 Trust: Bryan C. Mills <bcmills@google.com> Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
d8394bfc7f
commit
e838c76a6e
@ -29,7 +29,6 @@ import (
|
||||
// module-module "all" pattern no longer closes over the dependencies of
|
||||
// tests outside of the main module.
|
||||
const narrowAllVersionV = "v1.16"
|
||||
const go116EnableNarrowAll = true
|
||||
|
||||
var modFile *modfile.File
|
||||
|
||||
@ -300,9 +299,6 @@ func indexModFile(data []byte, modFile *modfile.File, needsFix bool) *modFileInd
|
||||
// (Otherwise — as in Go 1.16+ — the "all" pattern includes only the packages
|
||||
// transitively *imported by* the packages and tests in the main module.)
|
||||
func (i *modFileIndex) allPatternClosesOverTests() bool {
|
||||
if !go116EnableNarrowAll {
|
||||
return true
|
||||
}
|
||||
if i != nil && semver.Compare(i.goVersionV, narrowAllVersionV) < 0 {
|
||||
// The module explicitly predates the change in "all" for lazy loading, so
|
||||
// continue to use the older interpretation. (If i == nil, we not in any
|
||||
|
Loading…
Reference in New Issue
Block a user