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

Bump golang minimal version to 1.21 and 1.22 #531

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

jhrotko
Copy link
Collaborator

@jhrotko jhrotko commented Jan 17, 2024

In order to update the version of https://pkg.go.dev/golang.org/x/[email protected]/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
@@ -179,7 +180,7 @@ func convertIntoSequence(value any) []any {
i++
}
slices.SortFunc(seq, func(a, b any) int {
return compare(a.(string), b.(string))
Copy link
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

@@ -179,7 +180,7 @@ func convertIntoSequence(value any) []any {
i++
}
slices.SortFunc(seq, func(a, b any) int {
return compare(a.(string), b.(string))
Copy link
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
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
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
@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
@glours glours merged commit 7efd398 into compose-spec:main Feb 7, 2024
8 checks passed
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