* [ISSUE] Go 1.21 breaks 'go get' downloads
@ 2023-08-26 7:27 adrian-bl
2023-08-26 13:52 ` Go 1.21 breaks 'go get' and 'go mod tidy' downloads sgn
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: adrian-bl @ 2023-08-26 7:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
New issue by adrian-bl on void-packages repository
https://github.com/void-linux/void-packages/issues/45775
Description:
### Is this a new report?
Yes
### System Info
Void 6.3.13_1 x86_64 GenuineIntel uptodate rrFFFFF
### Package(s) Affected
go-1.21.0_1
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
Since go-1.21.0_1, downloading modules via `go mod tidy` fails with:
```
github.com/google/go-cmp/cmp: GOPROXY list is not the empty string, but contains no entries
```
This seems to be due to both `GOPROXY` and `GOSUMDB` being set to an empty value (due to `/usr/lib/go/go.env` not existing?)
```
$ go env|grep -E 'PROXY|SUM'
GONOPROXY=''
GONOSUMDB=''
GOPROXY=''
GOSUMDB=''
```
Upstream-go contains the following go.env file:
https://github.com/golang/go/blob/master/go.env
and setting the same values (either by `export ..` or `go env -w ...`) fixes the issue.
### Expected behaviour
go get and go mod tidy being able to download modules
### Actual behaviour
Fails due to empty GOPROXY setting
### Steps to reproduce
* Upgrade to go1.21
* cd $project
* rm go.*
* go mod init
* go mod tidy # <- fails
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Go 1.21 breaks 'go get' and 'go mod tidy' downloads
2023-08-26 7:27 [ISSUE] Go 1.21 breaks 'go get' downloads adrian-bl
@ 2023-08-26 13:52 ` sgn
2023-08-26 13:53 ` sgn
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2023-08-26 13:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 176 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/issues/45775#issuecomment-1694346393
Comment:
Which project are you talking about?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Go 1.21 breaks 'go get' and 'go mod tidy' downloads
2023-08-26 7:27 [ISSUE] Go 1.21 breaks 'go get' downloads adrian-bl
2023-08-26 13:52 ` Go 1.21 breaks 'go get' and 'go mod tidy' downloads sgn
@ 2023-08-26 13:53 ` sgn
2023-08-26 16:28 ` adrian-bl
2023-08-26 19:15 ` [ISSUE] [CLOSED] " Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: sgn @ 2023-08-26 13:53 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/issues/45775#issuecomment-1694346539
Comment:
The error is pretty clear:
```GOPROXY list is not the empty string``` which is obviously not empty string, which conflicts with what you said.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Go 1.21 breaks 'go get' and 'go mod tidy' downloads
2023-08-26 7:27 [ISSUE] Go 1.21 breaks 'go get' downloads adrian-bl
2023-08-26 13:52 ` Go 1.21 breaks 'go get' and 'go mod tidy' downloads sgn
2023-08-26 13:53 ` sgn
@ 2023-08-26 16:28 ` adrian-bl
2023-08-26 19:15 ` [ISSUE] [CLOSED] " Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: adrian-bl @ 2023-08-26 16:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 2284 bytes --]
New comment by adrian-bl on void-packages repository
https://github.com/void-linux/void-packages/issues/45775#issuecomment-1694403195
Comment:
> Which project are you talking about?
Any (Go) project: This is an issue with the Go installation itself, not an individual Go project.
Another way to reproduce is to attempt a simple `go install`, eg:
```
$ env | grep GO
$ which go
/usr/bin/go
$ go version
go version go1.21.0 linux/amd64
$ go install golang.org/x/tools/gopls@latest
go: golang.org/x/tools/gopls@latest: GOPROXY list is not the empty string, but contains no entries
```
Note that the same works out-of-the-box if i use a go-binary from https://go.dev/dl/:
```
$ wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
$ tar -xvf go1.21.0.linux-amd64.tar.gz
$ cd go
$ ./bin/go version
go version go1.21.0 linux/amd64
$ ./bin/go install golang.org/x/tools/gopls@latest
# works
```
Difference in go-env between the 2 installations:
```
$ /usr/bin/go env > 1
$ ./bin/go env > 2
$ diff -u 1 2
--- 1 2023-08-26 18:24:43.101796155 +0200
+++ 2 2023-08-26 18:24:45.258804051 +0200
@@ -15,12 +15,12 @@
GOOS='linux'
GOPATH='/home/wurstli/go'
GOPRIVATE=''
-GOPROXY=''
-GOROOT='/usr/lib/go'
-GOSUMDB=''
+GOPROXY='https://proxy.golang.org,direct'
+GOROOT='/tmp/go/go'
+GOSUMDB='sum.golang.org'
GOTMPDIR=''
-GOTOOLCHAIN=''
-GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
+GOTOOLCHAIN='auto'
+GOTOOLDIR='/tmp/go/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.0'
GCCGO='gccgo'
@@ -37,4 +37,4 @@
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
-GOGCCFLAGS='-fPIC -m64 -pthread -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3057310618=/tmp/go-build -gno-record-gcc-switches'
+GOGCCFLAGS='-fPIC -m64 -pthread -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1981408560=/tmp/go-build -gno-record-gcc-switches'
```
> GOPROXY list is not the empty string which is obviously not empty string, which conflicts with what you said.
Can you elaborate? This is the error as-is printed out from the go toolchain: Where/how does it conflict with what i said?
(For reference, the error seems to come from https://github.com/golang/go/blob/master/src/cmd/go/internal/modfetch/proxy.go#L123)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ISSUE] [CLOSED] Go 1.21 breaks 'go get' and 'go mod tidy' downloads
2023-08-26 7:27 [ISSUE] Go 1.21 breaks 'go get' downloads adrian-bl
` (2 preceding siblings ...)
2023-08-26 16:28 ` adrian-bl
@ 2023-08-26 19:15 ` Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2023-08-26 19:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]
Closed issue by adrian-bl on void-packages repository
https://github.com/void-linux/void-packages/issues/45775
Description:
### Is this a new report?
Yes
### System Info
Void 6.3.13_1 x86_64 GenuineIntel uptodate rrFFFFF
### Package(s) Affected
go-1.21.0_1
### Does a report exist for this bug with the project's home (upstream) and/or another distro?
Since go-1.21.0_1, downloading modules via `go mod tidy` fails with:
```
github.com/google/go-cmp/cmp: GOPROXY list is not the empty string, but contains no entries
```
This seems to be due to both `GOPROXY` and `GOSUMDB` being set to an empty value (due to `/usr/lib/go/go.env` not existing?)
```
$ go env|grep -E 'PROXY|SUM'
GONOPROXY=''
GONOSUMDB=''
GOPROXY=''
GOSUMDB=''
```
Upstream-go contains the following go.env file:
https://github.com/golang/go/blob/master/go.env
and setting the same values (either by `export ..` or `go env -w ...`) fixes the issue.
### Expected behaviour
go get and go mod tidy being able to download modules
### Actual behaviour
Fails due to empty GOPROXY setting
### Steps to reproduce
* Upgrade to go1.21
* cd $project
* rm go.*
* go mod init
* go mod tidy # <- fails
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-08-26 19:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26 7:27 [ISSUE] Go 1.21 breaks 'go get' downloads adrian-bl
2023-08-26 13:52 ` Go 1.21 breaks 'go get' and 'go mod tidy' downloads sgn
2023-08-26 13:53 ` sgn
2023-08-26 16:28 ` adrian-bl
2023-08-26 19:15 ` [ISSUE] [CLOSED] " Duncaen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).