Skip to content

Use utils.IterateOrderedMap() as intended, via for:=range (require Go 1.23)#276

Merged
oxzi merged 1 commit intomainfrom
IterateOrderedMap-1.23
Apr 22, 2025
Merged

Use utils.IterateOrderedMap() as intended, via for:=range (require Go 1.23)#276
oxzi merged 1 commit intomainfrom
IterateOrderedMap-1.23

Conversation

@Al2Klimov
Copy link
Copy Markdown
Member

No description provided.

@Al2Klimov Al2Klimov added the go Pull requests that update Go code label Aug 22, 2024
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Aug 22, 2024
@Al2Klimov Al2Klimov requested a review from oxzi August 22, 2024 08:59
@Al2Klimov Al2Klimov force-pushed the IterateOrderedMap-1.23 branch from ef004d8 to 722b6ae Compare August 22, 2024 09:03
Copy link
Copy Markdown
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

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

Future!

While this looks good at a first glance, I would like to wait some weeks before bumping the Go version. Allowing each of us to get to the latest Go version in their pace, before hitting build failures.

@Al2Klimov
Copy link
Copy Markdown
Member Author

@oxzi
Copy link
Copy Markdown
Member

oxzi commented Aug 26, 2024

Thanks for the roadmap. Just for your information, Go 1.23 is already available in the nixpkgs, just not under the go package name, as this would result a massive rebuild. The go package will be bumped for the next staging thing, iirc.

https://search.nixos.org/packages?channel=unstable&show=go_1_23

Copy link
Copy Markdown
Member

@oxzi oxzi left a comment

Choose a reason for hiding this comment

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

Please remove the change to the go.mod and rebase.

Comment thread go.mod
@Al2Klimov Al2Klimov force-pushed the IterateOrderedMap-1.23 branch from 722b6ae to 176abc6 Compare April 17, 2025 08:44
@oxzi oxzi force-pushed the IterateOrderedMap-1.23 branch from 176abc6 to ac235b7 Compare April 22, 2025 08:07
@oxzi
Copy link
Copy Markdown
Member

oxzi commented Apr 22, 2025

$ go test -race -count=1 ./...
# github.com/icinga/icinga-notifications/pkg/plugin
pkg/plugin/plugin.go:302:20: cannot range over utils.IterateOrderedMap(req.Object.Tags) (value of func type iter.Seq2[string, string]): requires go1.23 or later (-lang was set to go1.22; check go.mod)
pkg/plugin/plugin.go:308:21: cannot range over utils.IterateOrderedMap(req.Object.ExtraTags) (value of func type iter.Seq2[string, string]): requires go1.23 or later (-lang was set to go1.22; check go.mod)
# github.com/icinga/icinga-notifications/internal/utils [github.com/icinga/icinga-notifications/internal/utils.test]
internal/utils/utils_test.go:39:22: cannot range over IterateOrderedMap(tt.in) (value of func type iter.Seq2[int, string]): requires go1.23 or later (-lang was set to go1.22; check go.mod)

The rebase I requested is required to get this running. I have rebased this PR for you and would merge it unless the CI is going to fail now.

@oxzi oxzi merged commit 83656e1 into main Apr 22, 2025
26 checks passed
@oxzi oxzi deleted the IterateOrderedMap-1.23 branch April 22, 2025 08:14
@oxzi oxzi added this to the 0.2.0 milestone Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants