raghvender sundarjee has uploaded this change for review.
cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go
index f4f4a68..4edddc2 100644
--- a/src/cmd/go/internal/modload/init.go
+++ b/src/cmd/go/internal/modload/init.go
@@ -1001,7 +1001,7 @@
}
func errWorkTooOld(gomod string, wf *modfile.WorkFile, goVers string) error {
- return fmt.Errorf("module %s listed in go.work file requires go >= %s, but go.work lists go %s; to update it:\n\tgo work use",
+ return fmt.Errorf("module %s listed in go.work file requires go >= %s, but go.work lists go %s; Check if GOSUMDB, GOPRIVATE and GOPROXY are set and to update it:\n\tgo work use\nOtherwise\n\tUpgrate to go %[2]s - Download and install with PATH updated accordingly",
base.ShortPath(filepath.Dir(gomod)), goVers, gover.FromGoWork(wf))
}
diff --git a/src/cmd/go/testdata/script/mod_goline_too_new.txt b/src/cmd/go/testdata/script/mod_goline_too_new.txt
index 6d26679..34a3ca3 100644
--- a/src/cmd/go/testdata/script/mod_goline_too_new.txt
+++ b/src/cmd/go/testdata/script/mod_goline_too_new.txt
@@ -8,7 +8,7 @@
# go.mod referenced from go.work too new
cp go.work.old go.work
! go build .
-stderr '^go: module . listed in go.work file requires go >= 1.99999, but go.work lists go 1.10; to update it:\n\tgo work use$'
+stderr '^go: module . listed in go.work file requires go >= 1.99999, but go.work lists go 1.10; Check if GOSUMDB, GOPRIVATE and GOPROXY are set and to update it:\n\tgo work use\nOtherwise\n\tUpgrate to go 1.99999 - Download and install with PATH updated accordingly$'
! go work sync
stderr '^go: cannot load module . listed in go.work file: go.mod requires go >= 1.99999 \(running go 1\..+\)$'
diff --git a/src/cmd/go/testdata/script/work_goline_order.txt b/src/cmd/go/testdata/script/work_goline_order.txt
index fe1cddb..f604db0 100644
--- a/src/cmd/go/testdata/script/work_goline_order.txt
+++ b/src/cmd/go/testdata/script/work_goline_order.txt
@@ -7,7 +7,7 @@
env TESTGO_VERSION_SWITCH=switch
cp go.work go.work.orig
! go list
-stderr '^go: module . listed in go.work file requires go >= 1.21.2, but go.work lists go 1.21.1; to update it:\n\tgo work use$'
+stderr '^go: module . listed in go.work file requires go >= 1.21.2, but go.work lists go 1.21.1; Check if GOSUMDB, GOPRIVATE and GOPROXY are set and to update it:\n\tgo work use\nOtherwise\n\tUpgrate to go 1.21.2 - Download and install with PATH updated accordingly$'
go work use
go list
@@ -16,7 +16,7 @@
env TESTGO_VERSION_SWITCH=switch
cp go.work.orig go.work
! go list
-stderr '^go: module . listed in go.work file requires go >= 1.21.2, but go.work lists go 1.21.1; to update it:\n\tgo work use$'
+stderr '^go: module . listed in go.work file requires go >= 1.21.2, but go.work lists go 1.21.1; Check if GOSUMDB, GOPRIVATE and GOPROXY are set and to update it:\n\tgo work use\nOtherwise\n\tUpgrate to go 1.21.2 - Download and install with PATH updated accordingly$'
# go work use fixes the problem.
go work use
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #2 to this change.
cmd/go: "go work use" doesn't clearly indicate when download fails
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #3 to this change.
cmd/go: "go work use" doesn't clearly indicate when download fails
The change is to fix : For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang.
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #4 to this change.
cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #5 to this change.
cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
1 comment:
Commit Message:
Patch Set #5, Line 7: cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Please abide by the https://go.dev/doc/contribute#commit_messages .
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #6 to this change.
cmd/go: Provided actionable messages with options when go workspace is old (Version) against installed golang or modules under that go workspace.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to updated the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The recommendation message says this - either set these variables correct so that go work use works or if the issue still persists kindly upgrade the installed go lang version matching to modules and set it against go workspace.
fixes : https://github.com/golang/go/issues/64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, qiulaidongfeng.
1 comment:
Commit Message:
Patch Set #5, Line 7: cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Please abide by the https://go.dev/doc/contribute#commit_messages .
Done
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Commit Message:
Patch Set #5, Line 7: cmd/go: Fix for #64007 - For Too old go workspace against local go or go module - verbose modified to use go work use or upgrading the installed golang version
Done
@bcm...@google.com @26454...@qq.com - Can you Please review this
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
1 comment:
Commit Message:
Patch Set #6, Line 13: fixes : https://github.com/golang/go/issues/64007
Please abide by the https://go.dev/doc/contribute#commit_messages change to Fixes #64007
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #7 to this change.
cmd/go: Provided actionable messages with options when go workspace is old (Version) against installed golang or modules under that go workspace.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to updated the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The recommendation message says this - either set these variables correct so that go work use works or if the issue still persists kindly upgrade the installed go lang version matching to modules and set it against go workspace.
fixes #64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
raghvender sundarjee uploaded patch set #8 to this change.
cmd/go: Provide actionable message when go workspace or modules or installed go are not in aligned versions.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to update the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The current recommendation message is rephrased as - either set these variables correct so that go work use works with go version upgraded or if the issue still persists kindly upgrade the installed go version matching modules and set it against go workspace.
fixes #64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, qiulaidongfeng.
1 comment:
Commit Message:
Please abide by the https://go. […]
Done
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, qiulaidongfeng.
raghvender sundarjee uploaded patch set #9 to this change.
cmd/go: Provide actionable message when go workspace or modules or installed go are not in aligned versions.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to update the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The current recommendation message is rephrased as - either set these variables correct so that `go work use` works with go version upgraded or if the issue still persists kindly upgrade the installed go version matching modules and set it against go workspace.
fixes #64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, qiulaidongfeng.
raghvender sundarjee uploaded patch set #10 to this change.
cmd/go: provide actionable message when go workspace or modules or installed go are not in aligned versions.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to update the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The current recommendation message is rephrased as - either set these variables correct so that `go work use` works with go version upgraded or if the issue still persists kindly upgrade the installed go version matching modules and set it against go workspace.
fixes #64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, qiulaidongfeng.
raghvender sundarjee uploaded patch set #11 to this change.
cmd/go: provide actionable message when go workspace or modules or installed go are not in aligned versions.
Currently when go workspace is older than modules or go version, it is recommended to do go work use to update the local toolchain matching go version or modules under that workspace. However go work use fails based on toolchain download failures caused by combination of these 3 environment variables - GOSUMDB, GOPRIVATE and GOPROXY.
The current recommendation message is rephrased as - either set these variables correct so that `go work use` works with go version upgraded or if the issue still persists kindly upgrade the installed go version matching modules and set it against go workspace.
Fixes #64007
Change-Id: I87fc5170f365122d3216cc5d8de35a0f1bb9cec6
---
M src/cmd/go/internal/modload/init.go
M src/cmd/go/testdata/script/mod_goline_too_new.txt
M src/cmd/go/testdata/script/work_goline_order.txt
3 files changed, 4 insertions(+), 4 deletions(-)
To view, visit change 542696. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Bryan Mills, raghvender sundarjee.
Patch set 11:Run-TryBot +1