While compiling a cosmos sdk project I am getting this /root/go/pkg/mod/github.com/cosmos/[email protected]/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
This is du to the slices package, as the sortFunc is now returning an int. How can we do a replace of the slices go package ?
Would you any idea ?
Maintainer Julien Robert replied in issue ticket [Bug]: cosmos sdk 0.47.5 does not compile with new go slices package #18415 that it's precisely because the exp package has an API change that they didn't bump it to the new version in v0.47. Quoting the rest of their reply:
Another user there reports that they solved the problem by changing go.mod to go 1.19, removing the
golang.org/x/expindirect package, and then runninggo mod tidyagain.