-
Notifications
You must be signed in to change notification settings - Fork 147
Build error on override/merge.go line 129 #519
Copy link
Copy link
Closed
Description
Line 129 in 8585af8
| slices.SortFunc(seq, func(a, b any) bool { |
Latest version of golang/x/exp changes type of SortFunc: it now returns an int. See https://cs.opensource.google/go/x/exp/+/302865e7556b4ae5de27248ce625d443ef4ad3ed:slices/sort.go;dlc=d98519c114953aa372c373aa4c7122a39d7932af
When golang.org/x/exp is too new, you get this build error:
../../../go/pkg/mod/github.com/compose-spec/compose-go/v2@v2.0.0-beta.2/override/merge.go:129:24: type func(a any, b any) bool of func(a, b any) bool {…} does not match inferred type func(a any, b any) int for func(a E, b E) int
I fixed it by downgrading the exp package:
go get golang.org/x/exp@613f0c0eb8a1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels