]> Cypherpunks repositories - gostls13.git/commit
cmd/go: inject State parameter into `workcmd.runSync`
authorIan Alexander <jitsu@google.com>
Thu, 2 Oct 2025 21:00:18 +0000 (17:00 -0400)
committerIan Alexander <jitsu@google.com>
Mon, 20 Oct 2025 20:00:14 +0000 (13:00 -0700)
commitd9e6f95450134f55d35f63c8da7605019cfda1c3
treebc62dff6b50ffc2a4ff9e20f7c3da58399562053
parent9769a61e6420a05685142fabfb0932abd1375e14
cmd/go: inject State parameter into `workcmd.runSync`

This command modifies the call tree starting at `workcmd.runSync` 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/workcmd
rf 'inject modload.LoaderState runSync'
cd ..
./rf-cleanup.zsh

Change-Id: Ib8a7b332b89762a7463ace53243cae6aa0ffcc2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/709987
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/modload/init.go
src/cmd/go/internal/workcmd/sync.go