]> Cypherpunks repositories - gostls13.git/commit
cmd/go: inject State parameter into `work.runInstall`
authorIan Alexander <jitsu@google.com>
Wed, 8 Oct 2025 19:05:14 +0000 (15:05 -0400)
committerIan Alexander <jitsu@google.com>
Mon, 20 Oct 2025 20:04:01 +0000 (13:04 -0700)
commitd57c3fd743b723d564be5764024241cdefd5aa43
treeb53bd330902ffbb2a27f92f50bb62a87d486c5f0
parente94a5008f6bb182231ed4985651a8e6eb19a83cc
cmd/go: inject State parameter into `work.runInstall`

This command modifies the call tree starting at `work.runInstall` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

This commit is part of the overall effort to eliminate global
modloader state.

[git-generate]
cd src/cmd/go/internal/work
rf 'inject modload.LoaderState runInstall'
cd ..
./rf-cleanup.zsh

Change-Id: I038d2c4870d67835c165852b223eaad3e2496202
Reviewed-on: https://go-review.googlesource.com/c/go/+/710304
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/work/build.go