Skip to content

Commit e838c76

Browse files
author
Bryan C. Mills
committed
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 <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent d8394bf commit e838c76

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/cmd/go/internal/modload/modfile.go

-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
// module-module "all" pattern no longer closes over the dependencies of
3030
// tests outside of the main module.
3131
const narrowAllVersionV = "v1.16"
32-
const go116EnableNarrowAll = true
3332

3433
var modFile *modfile.File
3534

@@ -300,9 +299,6 @@ func indexModFile(data []byte, modFile *modfile.File, needsFix bool) *modFileInd
300299
// (Otherwise — as in Go 1.16+ — the "all" pattern includes only the packages
301300
// transitively *imported by* the packages and tests in the main module.)
302301
func (i *modFileIndex) allPatternClosesOverTests() bool {
303-
if !go116EnableNarrowAll {
304-
return true
305-
}
306302
if i != nil && semver.Compare(i.goVersionV, narrowAllVersionV) < 0 {
307303
// The module explicitly predates the change in "all" for lazy loading, so
308304
// continue to use the older interpretation. (If i == nil, we not in any

0 commit comments

Comments
 (0)