-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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, buildGoModule, buildGoPackage: default to 1.18 #164320
Conversation
cc @NixOS/golang @Mic92 Can we create a job for this on the community hydra? |
Update gopls. This also changes the version of go used to build it to go1.18. This is required for gopls to work with go1.18 code. It's still backwards compatible with go1.17 code, so building with 1.18 should allow us to support all supported go versions (1.17+1.18) correctly, while building with 1.17 does not. Once NixOS#164320 merges, this should switch back to buildGoModule.
Now hydra is catching up after the openssl mass rebuild this is a bit easier to work on, seems besides the usual broken builds we also have some vendor breakage that needs to be addressed as well. |
We might want to be a bit careful about bumping the defaults here - the X509 changes aren't necessarily easy to bump everything to wholesale (they broke a lot of kubernetes tests for example), and should be fixed in go 1.18.1 (golang/go#41682 (comment)) |
Seeing some build failures due to our outdated
|
This updates errcheck to a newer version which has go1.18 support. There's no tagged release yet for this, but without this change, this package breaks under go1.18, so it seems worth updating before upstream tags. Related to NixOS#164320 The switch to 'subPackages' was added because 'testdata' contains a 'main_test.go' file which is not meant to be actually tested, and the default checkPhase will try to run 'cd testdata && go test' unless you do _something_ to override it. Since checkPhase doesn't respect 'excludedPackages', but does respect 'subPackages', this seemed like a reasonable way to do that.
I applied this PR to NixOS master and did not have problems with grafana, victoriametrics, prometheus-node-exporter, prometheus-statsd-exporter, lego. |
Due to the recent actions of another committer I don't really have much motivation to continue working on To finish this PR:
❯ nix-build -A cni-plugin-flannel.go-modules --check
unpacking sources
unpacking source archive /nix/store/5palv2cyrzjx6mgxhaf4ajphr1v2l1vj-source
source root is source
patching sources
configuring
building
go: github.com/containernetworking/[email protected]: missing go.sum entry; to add it:
go mod download github.com/containernetworking/cni
go: downloading github.com/containernetworking/cni v1.0.0
go: downloading github.com/containernetworking/plugins v1.0.0
go: downloading github.com/onsi/ginkgo v1.16.4
go: github.com/containernetworking/[email protected]: missing go.sum entry; to add it:
go mod download github.com/containernetworking/cni
error: builder for '/nix/store/lxx49mf12pmnaa5hpkyi9ddfn3a8zhx7-cni-plugin-flannel-1.0.0-go-modules.drv' failed with exit code 1;
last 10 log lines:
> patching sources
> configuring
> building
> go: github.com/containernetworking/[email protected]: missing go.sum entry; to add it:
> go mod download github.com/containernetworking/cni
> go: downloading github.com/containernetworking/cni v1.0.0
> go: downloading github.com/containernetworking/plugins v1.0.0
> go: downloading github.com/onsi/ginkgo v1.16.4
> go: github.com/containernetworking/[email protected]: missing go.sum entry; to add it:
> go mod download github.com/containernetworking/cni
For full logs, run 'nix log /nix/store/lxx49mf12pmnaa5hpkyi9ddfn3a8zhx7-cni-plugin-flannel-1.0.0-go-modules.drv'. |
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/
)nixos/doc/manual/md-to-db.sh
to update generated release notes