This slices sorting was introduced from the experimental package (the one you are using) to the std library, on doing so they decided to change the actual signature of the function from func(a, b E) bool to func(a, b E) int, you can check the PR
Now this break the SDK for my build process using Go version 1.21 (also tried 1.20)
Maybe I may be doing something wrong but I see this as possible point of failure in the future
Version
v0.47.5
Steps to Reproduce
I created a small snippet, to try to query a pool:
# github.com/cosmos/cosmos-sdk/runtime/services
../../go/pkg/mod/github.com/osmosis-labs/cosmos-sdk@v0.47.5-v23-osmo-2-iavl-v1/runtime/services/reflection.go:60:28: type func(x *descriptorpb.FileDescriptorProto, y *descriptorpb.FileDescriptorProto) bool of func(x, y *descriptorpb.FileDescriptorProto) bool {…} does not match inferred type func(a *descriptorpb.FileDescriptorProto, b *descriptorpb.FileDescriptorProto) int for func(a E, b E) int
Summary of Bug
In line https://github.com/osmosis-labs/cosmos-sdk/blob/10406e3b6d6ed3632d66847a08e8480c4e81015a/runtime/services/reflection.go#L60 I could find the use of
SortFunc
This slices sorting was introduced from the experimental package (the one you are using) to the std library, on doing so they decided to change the actual signature of the function from
func(a, b E) bool
tofunc(a, b E) int
, you can check the PRNow this break the SDK for my build process using Go version 1.21 (also tried 1.20)
Maybe I may be doing something wrong but I see this as possible point of failure in the future
Version
v0.47.5
Steps to Reproduce
I created a small snippet, to try to query a pool:
This break giving the following error:
my go.mod after
go mod tidy