]> Cypherpunks repositories - gostls13.git/commit
[dev.cmdgo] cmd/go: add the workspace mode
authorMichael Matloob <matloob@golang.org>
Tue, 8 Jun 2021 21:07:10 +0000 (17:07 -0400)
committerMichael Matloob <matloob@golang.org>
Mon, 26 Jul 2021 21:12:11 +0000 (21:12 +0000)
commit7ce257147fe0ab3413c8e36909c2408c833efdb8
tree7604e92d876b3c1ed69a27659f93fa507e21d151
parent3cd15e02ed26d86556cb59ff509a1f5a08bca29e
[dev.cmdgo] cmd/go: add the workspace mode

This change adds the outline of the implementation of the workspace mode.
The go command will now locate go.work files, and read them to determine
which modules are in the workspace. It will then put those modules in
the root of the workspace when building the build list. It supports
building, running, testing, and listing in workspaces. There are still
many TODOs for undone work and other changes to fix certain cases. Some
of these undone parts include: replaces and go.work.sum files, as well
as go mod {test,why,verify}, excludes in workspaces, updating work files
to include module names in comments and setting the GOWORK variable.

For #45713

Change-Id: I72716af7a300a2896087fc8a79c04e951d248278
Reviewed-on: https://go-review.googlesource.com/c/go/+/334934
Trust: Michael Matloob <matloob@golang.org>
Run-TryBot: Michael Matloob <matloob@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
15 files changed:
src/cmd/go/alldocs.go
src/cmd/go/internal/base/flag.go
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/envcmd/env.go
src/cmd/go/internal/list/list.go
src/cmd/go/internal/modcmd/download.go
src/cmd/go/internal/modcmd/graph.go
src/cmd/go/internal/modcmd/verify.go
src/cmd/go/internal/modcmd/why.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/run/run.go
src/cmd/go/internal/test/test.go
src/cmd/go/internal/test/testflag.go
src/cmd/go/internal/work/build.go
src/cmd/go/testdata/script/work.txt [new file with mode: 0644]