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_1_21: bootstrap from 1.21 #246935

Merged
merged 1 commit into from
Aug 30, 2023
Merged

go_1_21: bootstrap from 1.21 #246935

merged 1 commit into from
Aug 30, 2023

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Aug 3, 2023

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@zowoq zowoq added the 2.status: work-in-progress This PR isn't done label Aug 3, 2023
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Aug 3, 2023
@ofborg ofborg bot requested review from kalbasit, Mic92 and qbit August 3, 2023 09:03
@zowoq zowoq mentioned this pull request Aug 3, 2023
12 tasks
@colemickens
Copy link
Member

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. 👍

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a 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.

@@ -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
Copy link
Member

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

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member

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)

Copy link
Contributor

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

Copy link
Contributor

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

@@ -52,6 +52,9 @@ assert (args' ? vendorHash && args' ? vendorSha256) -> throw "both `vendorHash`
let
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ];

GO111MODULE = "on";
Copy link
Member

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

@@ -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
Copy link
Member

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)

@KunalSin9h
Copy link

When this will going to merge.

@caarlos0
Copy link
Member

anything I can do to help getting this merged?

@KunalSin9h
Copy link

i was trying to use go1.21 in my nix flake, but it is not packaged yet!

@zowoq
Copy link
Contributor Author

zowoq commented Aug 19, 2023

We're waiting for the commits from #238100 to land in master.

https://nixpk.gs/pr-tracker.html?pr=238100

@@ -17,8 +17,8 @@
}:

let
useGccGoBootstrap = stdenv.buildPlatform.isMusl || stdenv.buildPlatform.isRiscV;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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 👍

@yihuang
Copy link
Contributor

yihuang commented Aug 21, 2023

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".

@yihuang
Copy link
Contributor

yihuang commented Aug 21, 2023

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

@zowoq
Copy link
Contributor Author

zowoq commented Aug 30, 2023

@ofborg build clash clash-verge diffoci juicity sq tailscale terraform-providers.tailscale trayscale usql

@zowoq zowoq marked this pull request as ready for review August 30, 2023 02:31
@zowoq zowoq merged commit 020300a into NixOS:master Aug 30, 2023
@zowoq zowoq deleted the go-riscv branch August 30, 2023 02:32
@caarlos0
Copy link
Member

Go 1.21 is still not available in nixpkgs... I'm not sure I understand things correctly, but I think this is missing? -> #254877

@kirillrdy
Copy link
Member

Go 1.21 is still not available in nixpkgs... I'm not sure I understand things correctly, but I think this is missing? -> #254877

nix search nixpkgs#go_1_21
* legacyPackages.x86_64-linux.go_1_21 (1.21.1)
  The Go Programming language

@caarlos0
Copy link
Member

ahh thank you! 🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: golang 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants