aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/modfile.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2021-06-28 15:48:03 -0400
committerMichael Matloob <matloob@golang.org>2021-07-28 18:11:31 +0000
commit288a83dcffef18514e8c01f0ca2053c6be185305 (patch)
treea77f77dbc118f01f1c199ca45d6bf5598ca560fa /src/cmd/go/internal/modload/modfile.go
parent2c8acf63c233430f8fb48f37c6ec54a29bd53c28 (diff)
downloadgo-288a83dcffef18514e8c01f0ca2053c6be185305.tar.gz
go-288a83dcffef18514e8c01f0ca2053c6be185305.zip
[dev.cmdgo] cmd/go: maintain a go.work.sum file
This change causes the go command to maintain a separate go.work.sum file when in workspace mode rather than using the go.sum files from the individual modules. This isn't quite what the proposal spec specifies, which is that the sums that don't exist in any of the workspace modules are added to go.work.sum rather than the necessary sums. That will be done in a future change. Change-Id: I528b9b153a93a4cd67c5af471ad6d5bd3628578b Reviewed-on: https://go-review.googlesource.com/c/go/+/334939 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>
Diffstat (limited to 'src/cmd/go/internal/modload/modfile.go')
-rw-r--r--src/cmd/go/internal/modload/modfile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/modfile.go b/src/cmd/go/internal/modload/modfile.go
index f5332ef52f..79126a46b5 100644
--- a/src/cmd/go/internal/modload/modfile.go
+++ b/src/cmd/go/internal/modload/modfile.go
@@ -532,7 +532,7 @@ func goModSummary(m module.Version) (*modFileSummary, error) {
}
actual := resolveReplacement(m)
- if HasModRoot() && cfg.BuildMod == "readonly" && actual.Version != "" {
+ if HasModRoot() && cfg.BuildMod == "readonly" && !inWorkspaceMode() && actual.Version != "" {
key := module.Version{Path: actual.Path, Version: actual.Version + "/go.mod"}
if !modfetch.HaveSum(key) {
suggestion := fmt.Sprintf("; to add it:\n\tgo mod download %s", m.Path)