-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Bug]: cosmos sdk 0.47.5 does not compile with new go slices package #18415
Comments
That is correct. This is why we haven't bumped it in v0.47. Bumping it could potentially be API breaking for people having modules on v0.47. Patch releases must not contain any breaking changes. What you can do it downgrade and use the same version that is used in the SDK. Another solution, although overkill, is to upgrade to v0.50 with contains latest x/exp. |
@trevormil solved for me by changing go.mod to go 1.19, remove |
I have same problem while building CosmosSDK v0.47.6, however removing |
Can you post your error message here? |
I resolved my issue with this, but just a suggestion: it seems like the SortFunc return value doesn't actually get returned to the user. Would it still be considered a breaking change if you just handled it internally with the new version of golang.org/x/exp? |
Right, but bumping it may require custom modules using this to have to update. |
Is there an existing issue for this?
What happened?
While compiling a cosmos sdk project,
I am getting this
My project has a dependency for the latest go slices package, and the SDK is not compiling because of it. Others are experiencing the same (https://stackoverflow.com/questions/77159882/cosmos-sdk-does-not-compile-with-new-slices-package).
The problem function is this one in /runtime/services/reflection.go
The golang.org/x/exp package says that .SortFunc is not stable and it changed in the v0.0.0-20230905200255-921286631fa9
Sep 5, 2023 update. The expected return value is now an integer instead of a boolean.
The most recent working version should be v0.0.0-20230425010034-47ecfdc1ba53
Apr 25, 2023.
I also noticed that in x/gov/module.go, this function is used as well.
Cosmos SDK Version
0.47
How to reproduce?
With ignite scaffold chain (v0.27.2), I scaffolded a new chain with ignite scaffold chain.
Then, I added golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect and tried to build with ignite chain build or serve with ignite chain serve.
The text was updated successfully, but these errors were encountered: