-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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_1_21: bootstrap from 1.21 #246935
go_1_21: bootstrap from 1.21 #246935
Conversation
Looks like this includes the stuff to get riscv64 going too. Again, I didn't have to set quite as many GO* env vars, and I can't say I'm qualified to review them specifically, but otherwise this looks like what I have been running for a while. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff LGTM, if I encounter any issues I'll let you know
Also now we could probably drop go 1.18.
pkgs/build-support/go/module.nix
Outdated
@@ -85,6 +87,9 @@ let | |||
runHook preConfigure | |||
export GOCACHE=$TMPDIR/go-cache | |||
export GOPATH="$TMPDIR/go" | |||
# fixes 'GOPROXY list is not the empty string, but contains no entries' | |||
# "https://proxy.golang.org,direct" is the go default | |||
export GOPROXY="''${GOPROXY:-"https://proxy.golang.org,direct"}" # respect impureEnvVars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't set this variable I am always receiving the following error when vendoring something with go:
gopkg.in/yaml.v2 tested by
gopkg.in/yaml.v2.test imports
gopkg.in/check.v1: GOPROXY list is not the empty string, but contains no entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am also receiving github.com/stretchr/testify/assert: github.com/stretchr/testify@v1.8.4: verifying go.mod: missing GOSUMDB
unless I have GOSUMDB=off
env set. Not sure if this is related but it feels odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't set this variable I am always receiving the following error when vendoring something with go: [...]
GOPROXY list is not the empty string, but contains no entries
Just in case that's in response to me, and/or just to provide another data point... This is the main one I had to set to get my "normal" go packages building again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better setting GOSUMDB to the default? (sum.golang.org)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we just need to install the go.env
into GOROOT.
https://github.com/golang/go/blob/master/go.env
golang/go#57179
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we just need to install the
go.env
into GOROOT. https://github.com/golang/go/blob/master/go.env golang/go#57179
fixed: #250472
pkgs/build-support/go/module.nix
Outdated
@@ -52,6 +52,9 @@ assert (args' ? vendorHash && args' ? vendorSha256) -> throw "both `vendorHash` | |||
let | |||
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ]; | |||
|
|||
GO111MODULE = "on"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is default since go 1.18 or 1.17
pkgs/build-support/go/module.nix
Outdated
@@ -85,6 +87,9 @@ let | |||
runHook preConfigure | |||
export GOCACHE=$TMPDIR/go-cache | |||
export GOPATH="$TMPDIR/go" | |||
# fixes 'GOPROXY list is not the empty string, but contains no entries' | |||
# "https://proxy.golang.org,direct" is the go default | |||
export GOPROXY="''${GOPROXY:-"https://proxy.golang.org,direct"}" # respect impureEnvVars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better setting GOSUMDB to the default? (sum.golang.org)
When this will going to merge. |
anything I can do to help getting this merged? |
i was trying to use go1.21 in my nix flake, but it is not packaged yet! |
We're waiting for the commits from #238100 to land in master. |
@@ -17,8 +17,8 @@ | |||
}: | |||
|
|||
let | |||
useGccGoBootstrap = stdenv.buildPlatform.isMusl || stdenv.buildPlatform.isRiscV; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @zhaofengli
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally missed this. It's nice that we now have a binary bootstrap seed 👍
I try to use the go 1.21 in current master branch, but always get error: "GOPROXY list is not the empty string, but contains no entries". |
it's fixed by this: #250472 |
@ofborg build clash clash-verge diffoci juicity sq tailscale terraform-providers.tailscale trayscale usql |
Go 1.21 is still not available in nixpkgs... I'm not sure I understand things correctly, but I think this is missing? -> #254877 |
|
ahh thank you! 🙏🏻 |
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)