]> Cypherpunks repositories - gostls13.git/commit
cmd/go: flip relationship between load and modload
authorJay Conrod <jayconrod@google.com>
Thu, 17 Sep 2020 19:54:13 +0000 (15:54 -0400)
committerJay Conrod <jayconrod@google.com>
Thu, 17 Sep 2020 20:57:33 +0000 (20:57 +0000)
commit9a702fd427645e4bcd42a68f9676bc1ab2adb6e4
treea61134c1b16f4fff66863c1225ef6a2f79e2fc70
parente6426dfd6dbc47ba23b8a91003b8f947c5afa692
cmd/go: flip relationship between load and modload

Previously, modload imported load, but it mainly just did so in order
to install callbacks to the modload API. This was important during vgo
development, but there's no longer a strong reason to do this. Nothing
modload imports strongly depends on load, so there's little danger of
a dependency cycle.

This change deletes the callbacks in load and instead, makes load call
exported functions in modload directly. In the future, these functions
may have different signatures than their GOPATH counterparts.

Change-Id: Ifde5c3ffebd190b5bd184924ec447d272b936f27
Reviewed-on: https://go-review.googlesource.com/c/go/+/255719
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/load/pkg.go
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/vcs/vcs.go
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/init.go