Skip to content

Bump golang minimal version to 1.21 and 1.22#531

Merged
glours merged 1 commit intocompose-spec:mainfrom
jhrotko:upgrade-exp-version
Feb 7, 2024
Merged

Bump golang minimal version to 1.21 and 1.22#531
glours merged 1 commit intocompose-spec:mainfrom
jhrotko:upgrade-exp-version

Conversation

@jhrotko
Copy link
Copy Markdown
Collaborator

@jhrotko jhrotko commented Jan 17, 2024

In order to update the version of https://pkg.go.dev/golang.org/x/exp@v0.0.0-20240112132812-db7319d0e0e3/slices we need to update the slices.SortFunc to be compatible withy the latest version.

Related with #519

@jhrotko jhrotko changed the title updated go-exp version Bump golang version to 1.21 and 1.22 Jan 18, 2024
@jhrotko jhrotko force-pushed the upgrade-exp-version branch from 26f893c to 6ff1656 Compare February 7, 2024 16:54
i++
}
slices.SortFunc(seq, func(a, b any) int {
return compare(a.(string), b.(string))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

please also remove this func, as we won't need the conditional build anymore

i++
}
slices.SortFunc(seq, func(a, b any) int {
return compare(a.(string), b.(string))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

So, I am not sure, should we use compare or cmp.Compare? @ndeloof

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cmp.Compare should be safe (?), at least we already use it on go1.21+, so better just remove the compare/compare120 hack

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

done!

@jhrotko jhrotko changed the title Bump golang version to 1.21 and 1.22 Bump golang minimal version to 1.21 and 1.22 Feb 7, 2024
@jhrotko jhrotko force-pushed the upgrade-exp-version branch 2 times, most recently from eb4780b to 8d96c65 Compare February 7, 2024 17:30
@jhrotko jhrotko marked this pull request as ready for review February 7, 2024 17:30
Signed-off-by: jhrotko <joana.hrotko@docker.com>
@jhrotko jhrotko force-pushed the upgrade-exp-version branch from 8d96c65 to 22508c3 Compare February 7, 2024 17:31
@jhrotko jhrotko self-assigned this Feb 7, 2024
@jhrotko jhrotko added the dependencies Pull requests that update a dependency file label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants