-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
chore(x/upgrade): Use cosmossdk.io/core/codec
instead of github.com/cosmos/cosmos-sdk/codec
#23261
Conversation
📝 WalkthroughWalkthroughThe pull request introduces changes to the upgrade module's codec import and configuration. The modifications involve transitioning from the Cosmos SDK's original codec package to a new codec implementation from Changes
Suggested Labels
Suggested Reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (5)
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
x/upgrade/depinject.go
(1 hunks)x/upgrade/keeper/keeper.go
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
x/upgrade/depinject.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
x/upgrade/keeper/keeper.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
🪛 golangci-lint (1.62.2)
x/upgrade/depinject.go
15-15: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
(gci)
x/upgrade/keeper/keeper.go
23-23: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
(gci)
🪛 GitHub Actions: Lint
x/upgrade/depinject.go
[error] 8-8: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
[error] 15-15: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
x/upgrade/keeper/keeper.go
[error] 16-16: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
[error] 23-23: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: tests (00)
- GitHub Check: test-system-v2
- GitHub Check: Analyze
- GitHub Check: build (amd64)
- GitHub Check: Summary
🔇 Additional comments (1)
x/upgrade/keeper/keeper.go (1)
Line range hint
32-72
: LGTM! The Keeper struct and NewKeeper function look good.The codec field type in the Keeper struct and its usage in the NewKeeper function remain compatible with the new codec import.
🧰 Tools
🪛 golangci-lint (1.62.2)
23-23: File is not
gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order(gci)
🪛 GitHub Actions: Lint
[error] 23-23: File is not
gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
x/upgrade/depinject.go
Outdated
@@ -12,8 +12,8 @@ import ( | |||
"cosmossdk.io/x/upgrade/keeper" | |||
"cosmossdk.io/x/upgrade/types" | |||
|
|||
"cosmossdk.io/core/codec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix import ordering.
The import statement needs to be reordered according to the project's import group ordering rules: standard, default, prefix(cosmossdk.io), prefix(github.com/cosmos/cosmos-sdk).
- "cosmossdk.io/core/codec"
- "github.com/cosmos/cosmos-sdk/client/flags"
- "github.com/cosmos/cosmos-sdk/types/module"
- authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
+ "cosmossdk.io/core/codec"
+ "cosmossdk.io/core/address"
+ "cosmossdk.io/core/appmodule"
+ coreserver "cosmossdk.io/core/server"
+ "cosmossdk.io/depinject"
+ "cosmossdk.io/depinject/appconfig"
+ "cosmossdk.io/x/upgrade/keeper"
+ "cosmossdk.io/x/upgrade/types"
+
+ "github.com/cosmos/cosmos-sdk/client/flags"
+ "github.com/cosmos/cosmos-sdk/types/module"
+ authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 golangci-lint (1.62.2)
15-15: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
(gci)
🪛 GitHub Actions: Lint
[error] 15-15: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
x/upgrade/keeper/keeper.go
Outdated
@@ -20,7 +20,7 @@ import ( | |||
storetypes "cosmossdk.io/store/types" | |||
"cosmossdk.io/x/upgrade/types" | |||
|
|||
"github.com/cosmos/cosmos-sdk/codec" | |||
"cosmossdk.io/core/codec" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix import ordering.
The import statement needs to be reordered according to the project's import group ordering rules: standard, default, prefix(cosmossdk.io), prefix(github.com/cosmos/cosmos-sdk).
- "cosmossdk.io/core/codec"
- "github.com/cosmos/cosmos-sdk/runtime"
- "github.com/cosmos/cosmos-sdk/telemetry"
- sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
- "github.com/cosmos/cosmos-sdk/types/kv"
+ "cosmossdk.io/core/codec"
+ "cosmossdk.io/core/appmodule"
+ "cosmossdk.io/core/server"
+ errorsmod "cosmossdk.io/errors"
+ "cosmossdk.io/store/prefix"
+ storetypes "cosmossdk.io/store/types"
+ "cosmossdk.io/x/upgrade/types"
+
+ "github.com/cosmos/cosmos-sdk/runtime"
+ "github.com/cosmos/cosmos-sdk/telemetry"
+ sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
+ "github.com/cosmos/cosmos-sdk/types/kv"
Committable suggestion skipped: line range outside the PR's diff.
🧰 Tools
🪛 golangci-lint (1.62.2)
23-23: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
(gci)
🪛 GitHub Actions: Lint
[error] 23-23: File is not gci
-ed with --skip-generated -s standard -s default -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) --custom-order
cc @julienrbrt |
hey can you fix the lint issue and then we can move towards merging approving the pr |
…sdk into feat/use-core-code
@Mergifyio backport release/v0.52.x |
✅ Backports have been created
|
Description
Partially addresses: #23253
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.
I have...
Summary by CodeRabbit
Dependency Update
Technical Maintenance