aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/modfile.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2021-03-19 15:55:30 -0400
committerBryan C. Mills <bcmills@google.com>2021-03-22 15:24:20 +0000
commite838c76a6ea99007b872669b06590a41278f6188 (patch)
treecb9c3a5344fb09f95fbb92401f48213d05321f4a /src/cmd/go/internal/modload/modfile.go
parentd8394bfc7fa728da9654f5e902df03a29d2a03ca (diff)
downloadgo-e838c76a6ea99007b872669b06590a41278f6188.tar.gz
go-e838c76a6ea99007b872669b06590a41278f6188.zip
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>
Diffstat (limited to 'src/cmd/go/internal/modload/modfile.go')
-rw-r--r--src/cmd/go/internal/modload/modfile.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/cmd/go/internal/modload/modfile.go b/src/cmd/go/internal/modload/modfile.go
index 2afa831583..6cbad46c4d 100644
--- a/src/cmd/go/internal/modload/modfile.go
+++ b/src/cmd/go/internal/modload/modfile.go
@@ -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