Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: update to 1.21.0 #19815

Merged
merged 1 commit into from
Aug 9, 2023
Merged

go: update to 1.21.0 #19815

merged 1 commit into from
Aug 9, 2023

Conversation

herbygillot
Copy link
Member

Verification

Have you

  • followed our Commit Message Guidelines?
  • squashed and minimized your commits?
  • checked that there aren't other open pull requests for the same change?
  • referenced existing tickets on Trac with full URL?
  • checked your Portfile with port lint --nitpick?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install sudo port -d destroot?
  • tested basic functionality of all binary files?
  • checked that the Portfile's most important variants haven't been broken?

@macportsbot
Copy link

Notifying maintainers:
@ci42 for port go.

@macportsbot macportsbot added type: update maintainer maintainer: open Affects an openmaintainer port by: member Created by a member with commit rights labels Aug 9, 2023
@herbygillot herbygillot merged commit f6a3555 into macports:master Aug 9, 2023
3 checks passed
@jpeeler
Copy link
Contributor

jpeeler commented Aug 14, 2023

@herbygillot I noticed that go.env was missing in /opt/local/lib/go. After putting the file in place, GOPROXY functioned as expected: golang/go#61928.

@saj
Copy link
Contributor

saj commented Aug 15, 2023

I'm seeing the same problem on go@1.21.0_0.

% go mod init foo
go: creating new go.mod: module foo
% go get golang.org/x/exp/rand
go: golang.org/x/exp/rand: GOPROXY list is not the empty string, but contains no entries

To elaborate on jpeeler's workaround...

curl -LSsf -o /opt/local/lib/go/go.env https://raw.githubusercontent.com/golang/go/go1.21.0/go.env

go.env was added in upstream CR 462198 and landed in 7aa85e; first appeared in go1.21rc1.

golang/go#61928 was closed by the reporter but I wonder whether this is an upstream bug.
readEnvFile tolerates ENOENT; it is only later when the error is returned.

len(proxyOnce.list) == 0

Is that not expected if a downstream chooses to disable GOPROXY=?

In any case, I think we probably want to copy go.env into the destroot.


Edit: Maybe an empty GOPROXY is invalid by definition.

https://go.dev/ref/mod#resolve-pkg-mod

When the go command looks up a new module for a package path, it checks the GOPROXY environment variable, which is a comma-separated list of proxy URLs or the keywords direct or off. A proxy URL indicates the go command should contact a module proxy using the GOPROXY protocol. direct indicates that the go command should communicate with a version control system. off indicates that no communication should be attempted.

@herbygillot
Copy link
Member Author

@jpeeler @saj Thank you both for catching and commenting on this, tracking this in MacPorts Trac here: https://trac.macports.org/ticket/67961

This PR is meant to fix this: #19892

@herbygillot
Copy link
Member Author

This issue should now be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
by: member Created by a member with commit rights maintainer: open Affects an openmaintainer port maintainer type: update
5 participants