refactor(appconfig)!: simplify app config#19040
Conversation
| for _, permission := range in.AccountKeeper.GetModulePermissions() { | ||
| addrStr, err := in.AccountKeeper.AddressCodec().BytesToString(permission.GetAddress()) | ||
| if err != nil { | ||
| panic(err) | ||
| } | ||
| blockedAddresses[addrStr] = true | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map
| package appconfig | ||
|
|
||
| import ( | ||
| "reflect" |
Check notice
Code scanning / CodeQL
Sensitive package import
|
Warning Rate Limit Exceeded@julienrbrt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 21 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe updates reflect a significant reorganization of the Cosmos SDK's dependency injection system, involving renaming, moving functions, and updating documentation. Key functions like Changes
Note: The ellipsis (...) in the File Pattern column indicates a continuation of the file path that is contextually similar across multiple entries. 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
|
||
| #### Dependency Injection | ||
|
|
||
| <!-- explain app_config.go changes --> |
There was a problem hiding this comment.
It appears that there is a placeholder comment <!-- explain app_config.go changes --> which should be replaced with the actual explanation of changes made to app_config.go.
There is a placeholder comment that needs to be replaced with actual content explaining the changes to app_config.go. This is important for developers to understand the specific alterations and how to adjust their code.
The placeholder comment <!-- explain app_config.go changes --> indicates that a section of the documentation is missing. This should be completed to provide necessary information about the changes to app_config.go.
| #### Dependency Injection | ||
|
|
||
| <!-- explain app_config.go changes --> | ||
|
|
There was a problem hiding this comment.
The section under Dependency Injection is incomplete and requires an explanation of the changes made to app_config.go. This should be addressed to provide clarity to developers on how to adapt their applications.
alexanderbez
left a comment
There was a problem hiding this comment.
I like the notion of separating out depinject logic from module.go to depinject.go. Nice!
There was a problem hiding this comment.
Note, we probably should bring this back as deprecated for api mod.
I'd like to be able to delete it, but instead we may have to tweak the proto build to skip this file.
Do not merge. I'll finish that once I'm back
There was a problem hiding this comment.
Brought it back, but as mentioned in the PR description, removing cosmossdk.io/api from depinject doesn't work too well if we don't want to break api. I need to add some custom (hacky) logic to the proto-gen file and make some hacky things in https://github.com/cosmos/cosmos-sdk/blob/main/depinject/internal/appconfig/buf.gen.yaml.
Given that core imports grpc anyway (HasServices), I think it's not too bad to import /api (ref #19011) cc @tac0turtle
Description
Notes, the deletion of protos should be reverted but it was easier to see the api break and remove it.
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.mdReviewers 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.
I have...