]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: add a dormant depth type
authorBryan C. Mills <bcmills@google.com>
Wed, 7 Apr 2021 18:10:46 +0000 (14:10 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 8 Apr 2021 19:30:34 +0000 (19:30 +0000)
commitecca94a7d1fb4f00101af9831fcb395ed08b6948
tree3f6eaa6eabf6a0f024f852ec10fdd479767e8a6c
parent96a67450887314cedbd9e8634ad92b76a0443779
cmd/go/internal/modload: add a dormant depth type

This change adds the depth constants 'lazy' and 'eager', but leaves
the go117EnableLazyLoading constant set to false so that the depth in
effect is still always 'eager'.

The go117EnableLazyLoading constant can be toggled to true once the
module loader has been updated to maintain the lazy-loading invariants
in the go.mod file. In the meantime, this will allow me to
progressively replace uses of go117LazyTODO with real conditions and
locally toggle lazy-mode on to see which tests are still failing
(or which behaviors are missing test coverage).

For #36460

Change-Id: Ifd358265a3903a5000003c2072f28171f336e15c
Reviewed-on: https://go-review.googlesource.com/c/go/+/308515
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>
src/cmd/go/internal/modload/build.go
src/cmd/go/internal/modload/buildlist.go
src/cmd/go/internal/modload/import_test.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/modload/modfile.go