-
-
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: init at 1.21rc3 #238100
go_1_21: init at 1.21rc3 #238100
Conversation
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.
LGTM, and it builds fine too!
Seems 1.21 breaks the
Looks like we just need to fix |
Go 1.21 will download and run any Go toolchain built code references by default. I think this is something NixOS should disable, or at minimum communicate about. I'm not even convinced this behavior will work out of the box on NixOS since the Has this been discussed? Is there a NixOS policy that applies here? |
Downloading a toolchain isn't something we'd want to allow, I'll disable it. Very likely that it wouldn't work anyway. |
@ofborg eval |
prevent go from downloading another toolchain
pkgs/build-support/go/module.nix
Outdated
@@ -85,6 +87,7 @@ let | |||
runHook preConfigure | |||
export GOCACHE=$TMPDIR/go-cache | |||
export GOPATH="$TMPDIR/go" | |||
export GOPROXY="''${GOPROXY:-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.
Personally I think keeping it default (and making it overridable is better. Having sumdb backed checking seems like a win to me.
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.
Personally I think keeping it default
Do you mean the leaving it unset or setting https://proxy.golang.org,direct
?
I'd prefer not to set it at all but but need to do something to address #238100 (comment).
and making it overridable is better
Besides setting it via 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.
From my understanding of:
When GOTOOLCHAIN is set to local, the go command always runs the bundled Go toolchain.
We only need to set GOTOOLCHAIN to address the toolchain downloading concern.. Setting GOPROXY will impact module fetching as well as (if we didn't already have it as local
toolchain fetching)
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.
What does GOTOOLCHAIN have to do with the GOPROXY error?
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.
oh, my bad, I clicked it and read the comment below ;D
In that case, I think setting it to https://proxy.golang.org,direct
is the best approach (assuming it fixes the error).
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.
The ''
in the var value seems like a typo to me?
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.
In that case, I think setting it to https://proxy.golang.org,direct is the best approach (assuming it fixes the error).
I expect people probably won't like that proxy.golang.org
is set here even although it is the default that we've been using anyway.
The
''
in the var value seems like a typo to me?
It isn't a typo, need to escape ${}
.
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 have a version of this I'm maintaining as well. A few diffs, I didn't have to set as many env vars as you did. I also rewrote This means I have Go cross-compiling working for my riscv64 targets, which is nice, since they have published bootstrap binary builds for riscv64. Please feel free to steal commits: https://github.com/colemickens/nixpkgs/commits/go121 |
I don't know what this means? With
Will deal with stuff like this in a follow up, primary concern with this PR is aarch64/x86_64 on darwin/linux. |
I'll wait for |
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/
)