[go] cmd/go: refactor usage of `workFilePath`

0 views
Skip to first unread message

Ian Alexander (Gerrit)

unread,
Oct 7, 2025, 7:10:32 PM (13 hours ago) Oct 7
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Michael Matloob, Michael Matloob, golang-co...@googlegroups.com

Ian Alexander submitted the change

Unreviewed changes

5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Change information

Commit message:
cmd/go: refactor usage of `workFilePath`

This commit refactors usage of the global variable `workFilePath` to
the global LoaderState field of the same name.

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

[git-generate]
cd src/cmd/go/internal/modload
rf 'ex { workFilePath -> LoaderState.workFilePath }'
rf 'add State.requirements \
// Set to the path to the go.work file, or "" if workspace mode is\
// disabled'
rf 'rm workFilePath'
Change-Id: I53cdbc3cc619914421513db74a74a04ab10b3e33
Reviewed-by: Michael Matloob <mat...@google.com>
Reviewed-by: Michael Matloob <mat...@golang.org>
Files:
  • M src/cmd/go/internal/modload/buildlist.go
  • M src/cmd/go/internal/modload/init.go
  • M src/cmd/go/internal/modload/modfile.go
Change size: S
Delta: 3 files changed, 17 insertions(+), 20 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Michael Matloob, +1 by Michael Matloob
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I53cdbc3cc619914421513db74a74a04ab10b3e33
Gerrit-Change-Number: 698062
Gerrit-PatchSet: 12
Gerrit-Owner: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Ian Alexander <ji...@google.com>
Gerrit-Reviewer: Michael Matloob <mat...@golang.org>
Gerrit-Reviewer: Michael Matloob <mat...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages