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

[Backport release-24.05] go: Backport go 1.23 to nixos-24.05 #339654

Open
wants to merge 5 commits into
base: release-24.05
Choose a base branch
from

Conversation

mglazer
Copy link

@mglazer mglazer commented Sep 4, 2024

Description of changes

go 1.23 is the latest go version.

1.21 has already lost support: https://go.dev/doc/devel/release, this at least gives us some level of ability to take 1.23 and ensure our containers are built with the same go version.

Cherry-picked from: cf4f89e

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@mglazer mglazer changed the title Backport go 1.23 to our nixpkgs version Backport go 1.23 to nixos-24.05 Sep 4, 2024
@eclairevoyant
Copy link
Contributor

Please follow the guidelines here for backporting:
https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#how-to-backport-pull-requests

particularly cherry-picking, the branch to target, and ensuring that stable doesn't have breakage before backporting

@eclairevoyant eclairevoyant marked this pull request as draft September 5, 2024 00:48
@mglazer mglazer changed the base branch from nixos-24.05 to release-24.05 September 5, 2024 12:20
@mglazer mglazer changed the title Backport go 1.23 to nixos-24.05 [24.05] Backport go 1.23 to nixos-24.05 Sep 5, 2024
@mglazer
Copy link
Author

mglazer commented Sep 5, 2024

Thanks. Missed a few details there.

One thing, there is no single commit that I can pick to cherry pick. I'm backporting the entire package definition.

@mglazer mglazer force-pushed the mglazer/backport-go-123-upstream branch from 4eaaed9 to be9706f Compare September 5, 2024 12:27
@mglazer mglazer changed the title [24.05] Backport go 1.23 to nixos-24.05 [Backport release-24.05] go: Backport go 1.23 to nixos-24.05 Sep 5, 2024
@ofborg ofborg bot requested review from mfrw and qbit September 5, 2024 12:58
@mglazer mglazer marked this pull request as ready for review September 5, 2024 17:17
@winterqt
Copy link
Member

winterqt commented Sep 5, 2024

Please cherry-pick "properly," instead of adding your own commit message/comments/etc.

@winterqt winterqt marked this pull request as draft September 5, 2024 17:21
@eclairevoyant
Copy link
Contributor

One thing, there is no single commit that I can pick to cherry pick.

Then you may need to cherry-pick multiple commits. That's fine, but creating an entirely new commit on the release-* branch isn't.

(cherry picked from commit 2dbd8d8)
…#322825)

bootstrap binaries are static since 1.21

Co-authored-by: Ivan Trubach <[email protected]>
(cherry picked from commit e2cb76e)
@mglazer mglazer force-pushed the mglazer/backport-go-123-upstream branch from be9706f to ae86bdd Compare September 6, 2024 00:25
@mglazer
Copy link
Author

mglazer commented Sep 6, 2024

OK, backported everything except for the merge commits.

There was a single merge conflict with: d82203f which I resolved the best I could.

(cherry picked from commit 8a6b616)
@mglazer mglazer force-pushed the mglazer/backport-go-123-upstream branch from ae86bdd to ae08f10 Compare September 6, 2024 00:27
@mglazer
Copy link
Author

mglazer commented Sep 6, 2024

Is this the right way? It just seemed questionable to backport changes which bring in other unrelated changes.

homepage = "https://go.dev/";
license = licenses.bsd3;
maintainers = teams.golang.members;
platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi ++ platforms.freebsd;
Copy link
Author

Choose a reason for hiding this comment

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

The reason this is failing the cherrypick, is platforms.wasi was added here:

050df1a

which is before go1.23 existed. I opted to not add additional functionality that wasn't part of the strict set of cherrypicks when resolving the merge conflict. Happy to add platforms.wasi to go1.22 if that's desired.

@mglazer mglazer marked this pull request as ready for review September 6, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants