-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
fix(simapp/v2): full AutoCLI support #22410
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe changes in this pull request involve updates to various modules within the Cosmos SDK, primarily focusing on the restructuring of the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yml ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
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
|
@kocubinski your pull request is missing a changelog! |
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: 4
🧹 Outside diff range and nitpick comments (3)
simapp/v2/simdv2/cmd/root_di.go (1)
Line range hint
42-109
: Consider restructuring AutoCLI initialization flowThe current implementation spreads AutoCLI initialization across multiple points in the function, making it harder to understand and maintain. Consider consolidating the AutoCLI setup into a single, well-defined section of the function that:
- Initializes node commands
- Creates and populates module options
- Creates skeleton options
- Performs a single root command enhancement
This would improve code clarity and reduce the chance of initialization errors.
client/v2/autocli/app.go (2)
53-54
: Add documentation for SkipValidationBool type.Consider adding a documentation comment explaining the purpose and usage of this type.
+// SkipValidationBool is a custom boolean type used to control validation skipping in AppOptions. +// This is a temporary solution until the `ignored` tag feature is available. type SkipValidationBool bool
181-185
: Add documentation for nopAddressCodec.Consider adding documentation to explain the purpose of this no-op implementation:
+// nopAddressCodec is a no-op implementation of the address codec interface. +// It's used as a placeholder during skeleton initialization where actual address +// encoding/decoding is not required. type nopAddressCodec struct{}
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (3)
client/v2/autocli/app.go
(4 hunks)client/v2/go.mod
(1 hunks)simapp/v2/simdv2/cmd/root_di.go
(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- client/v2/go.mod
🧰 Additional context used
📓 Path-based instructions (2)
client/v2/autocli/app.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
simapp/v2/simdv2/cmd/root_di.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
🔇 Additional comments (3)
simapp/v2/simdv2/cmd/root_di.go (1)
42-44
: LGTM: Clean initialization of node commands and AutoCLI options
The code properly initializes and captures AutoCLI options from node commands.
client/v2/autocli/app.go (2)
90-93
: LGTM! Changes align with PR objective.
The conditional validation skip is correctly implemented and addresses the AutoCLI regression by allowing deferred initialization.
44-50
: Verify dependency on PR #22409.
The TODO comment references a dependency on PR #22409 for the ignored
tag feature. This implementation uses a custom type as a temporary solution.
✅ Verification successful
Temporary solution is appropriate while PR #22409 is pending
The current implementation using a custom SkipValidationBool
type is a reasonable temporary solution since PR #22409 (which will add ignored
tag support) is still open. The TODO comment accurately documents this dependency and the future migration path.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if the dependent PR is merged
gh pr view 22409 --json state,title,url
Length of output: 181
nodeCmds := nodeservice.NewNodeCommands() | ||
autoCliOpts.ModuleOptions = make(map[string]*autocliv1.ModuleOptions) | ||
autoCliOpts.ModuleOptions[nodeCmds.Name()] = nodeCmds.AutoCLIOptions() | ||
autoCliOpts.ModuleOptions = autoCLIModuleOpts |
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.
Remove duplicate root command enhancement
The root command is being enhanced with AutoCLI options twice: once at the beginning of the function and again here. This could lead to unexpected behavior or duplicate command registration.
Remove the first enhancement at lines 52-55 and keep only this final enhancement that occurs after all options are properly configured.
- if err = autoCliOpts.EnhanceRootCommand(rootCommand); err != nil {
- return rootCommand, nil
- }
Committable suggestion skipped: line range outside the PR's diff.
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.
tACK
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: 1
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
📒 Files selected for processing (1)
simapp/v2/simdv2/cmd/root_di.go
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
simapp/v2/simdv2/cmd/root_di.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
🔇 Additional comments (3)
simapp/v2/simdv2/cmd/root_di.go (3)
42-44
: LGTM: Clean initialization of AutoCLI module options
The initialization of node commands and AutoCLI module options is well-structured and follows good practices.
109-109
: LGTM: Proper placement of root command enhancement
This is the correct location for enhancing the root command, as it occurs after all module options are properly configured.
45-51
: Verify the initialization of AppOptionsSkeleton
The implementation and error handling look good. Let's verify that the NewAppOptionsSkeleton
function is properly handling the supplied configurations.
✅ Verification successful
NewAppOptionsSkeleton implementation is correctly handling configurations
The implementation properly:
- Takes module configs and module options as parameters
- Sets up interface registry with required options
- Injects dependencies using the provided module configs
- Returns AppOptions with all necessary components initialized
- Uses proper error handling throughout the initialization process
The usage in root_di.go
correctly provides the required arguments and handles potential errors. No issues found.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the NewAppOptionsSkeleton implementation
# Test: Search for NewAppOptionsSkeleton usage and implementation
ast-grep --pattern 'func NewAppOptionsSkeleton($$$) {
$$$
}'
Length of output: 64
Script:
#!/bin/bash
# Let's try a different approach to find the implementation and usage
# First, let's search for the file containing NewAppOptionsSkeleton
rg -l "NewAppOptionsSkeleton"
# Then let's look at its implementation and usage context
rg "NewAppOptionsSkeleton" -A 5 -B 5
Length of output: 1411
Script:
#!/bin/bash
# Let's examine the full implementation of NewAppOptionsSkeleton
cat client/v2/autocli/app.go
Length of output: 6212
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: 1
🧹 Outside diff range and nitpick comments (3)
client/v2/autocli/app.go (3)
45-52
: Add documentation for skipValidation field.The
skipValidation
field's purpose and usage conditions should be documented to help maintainers understand when it should be set to true/false.// AppOptions are the autocli options for an app. type AppOptions struct { Modules map[string]appmodule.AppModule ModuleOptions map[string]*autocliv1.ModuleOptions ClientCtx client.Context + // skipValidation determines whether to skip the builder validation step. + // It should be set to true when creating AppOptions for CLI parsing only, + // and false when the AppOptions will be used for command execution. skipValidation bool }
54-61
: Initialize skipValidation field explicitly.The function doesn't initialize the
skipValidation
field, which defaults to false. Consider explicitly setting it based on the intended usage to prevent unexpected validation behavior.func ProvideAppOptions(options Options) AppOptions { return AppOptions{ Modules: options.Modules, ModuleOptions: options.ModuleOptions, ClientCtx: options.ClientCtx, + skipValidation: false, // Explicit initialization for clarity } }
192-196
: Document nopAddressCodec's purpose.Add documentation to explain why this no-op implementation is used and when it's appropriate.
+// nopAddressCodec is a no-op implementation of address codec interfaces used +// during CLI parsing when actual address encoding/decoding is not needed. type nopAddressCodec struct{}
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
client/v2/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (7)
client/v2/autocli/app.go
(5 hunks)client/v2/go.mod
(1 hunks)simapp/go.mod
(1 hunks)simapp/v2/app_di.go
(2 hunks)simapp/v2/go.mod
(1 hunks)simapp/v2/simdv2/cmd/root_di.go
(2 hunks)tests/go.mod
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- simapp/v2/go.mod
🚧 Files skipped from review as they are similar to previous changes (2)
- client/v2/go.mod
- simapp/v2/simdv2/cmd/root_di.go
🧰 Additional context used
📓 Path-based instructions (3)
client/v2/autocli/app.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
simapp/v2/app_di.go (1)
Pattern **/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
tests/go.mod (1)
Pattern tests/**/*
: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
🔇 Additional comments (5)
simapp/v2/app_di.go (2)
4-4
: LGTM: Import statement correctly added
The autocli
package import is properly placed and follows the Go import grouping conventions.
62-63
: LGTM: AutoCLI provider correctly integrated
The addition of autocli.ProvideAppOptions
is well-placed and should resolve the deferred initialization issues mentioned in the PR objectives.
Let's verify the integration with other AutoCLI components:
✅ Verification successful
LGTM: AutoCLI provider is properly integrated with the ecosystem
The verification confirms that:
- The
autocli.ProvideAppOptions
is correctly placed in the dependency injection configuration - The AutoCLI system is properly integrated across the codebase:
- Initialization via
NewAppOptionsFromConfig
in the root command - Multiple modules implementing
AutoCLIOptions()
interface - Bank v2 module temporarily disabled with a tracked issue (gRPC and appmodulev2 handlers #21682)
- Complete AutoCLI options extraction system in place via
ExtractAutoCLIOptions
- Initialization via
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the AutoCLI integration across the codebase
# Expected: Find related AutoCLI initialization code that this provider interacts with
# Check for related AutoCLI initialization code
echo "Checking for AutoCLI initialization patterns..."
rg -l "autocli\.New.*Options" --type go
# Check for help command handlers that would use this provider
echo "Checking for help command handlers..."
rg -l "RunE.*help" --type go
Length of output: 294
Script:
#!/bin/bash
# Let's verify the AutoCLI integration with more specific patterns
# Check for autocli package imports and usage
echo "Checking for autocli imports and usage..."
rg -l "\"github\.com.*autocli\"" --type go
# Check the specific file that showed up in previous search
echo "Checking root_di.go implementation..."
cat simapp/v2/simdv2/cmd/root_di.go
# Look for other potential autocli configurations
echo "Checking for other autocli patterns..."
rg "autocli\." --type go -A 3
Length of output: 78647
Script:
#!/bin/bash
# Let's verify the AutoCLI integration more specifically
# Check for the actual AutoCLI initialization and usage in the app
echo "Checking AutoCLI initialization in app..."
rg "autocli\.(New|Provide)" --type go -A 3
# Check for modules implementing AutoCLI options
echo "Checking modules implementing AutoCLI..."
rg "func.*AutoCLIOptions" --type go -A 2
# Look for the dependency injection configuration
echo "Checking DI configuration..."
cat simapp/v2/app_di.go
Length of output: 13259
client/v2/autocli/app.go (1)
Line range hint 21-43
: Well-structured Options type with clear documentation!
The Options struct is well-designed with:
- Clear documentation including usage examples
- Appropriate use of dependency injection
- Well-defined optional fields
tests/go.mod (1)
7-7
: LGTM with a note about versioning.
The update to cosmossdk.io/collections
aligns with the PR's objective to fix AutoCLI support. However, note that we're using a pre-release version (v0.4.1-0.20241104084251-838f1557af0a
) instead of a stable release. While this is acceptable for testing purposes, we should plan to update to a stable release when available.
Let's verify the version consistency across related modules:
simapp/go.mod (1)
8-8
: Verify stability of pre-release version.
The update to a pre-release version v0.4.1-0.20241104084251-838f1557af0a
from stable version v0.4.0
might introduce instability. Please ensure this specific version has been thoroughly tested.
client/v2/autocli/app.go
Outdated
) | ||
|
||
// AppOptions are autocli options for an app. These options can be built via depinject based on an app config. Ex: | ||
// Options are input options for an autocli enabled app. These options can be built via depinject based on an app config. | ||
// Ex: | ||
// | ||
// var autoCliOpts autocli.AppOptions | ||
// err := depinject.Inject(appConfig, &encodingConfig.InterfaceRegistry, &autoCliOpts) |
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.
we should update this, to show that ProvideAppOptions
is required in the app config
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.
v1 will be broken I think, we should add the provider there and mention this in the client/v2 changelog and the UPGRADING.md (0.52 > Simapp > Client)
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.
I am actually getting this:
simdv2 tx bank --help
flag accessed but not defined: home
This (and related lines) in modules seems to be the cause, they are disabling flag parsing. cosmos-sdk/x/bank/v2/client/cli/tx.go Line 20 in 04da382
I can set this back to false during Parse, and leave it true in execution?
|
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: 0
🧹 Outside diff range and nitpick comments (7)
x/consensus/go.mod (1)
Line range hint
3-3
: Fix incorrect Go version specificationThe specified Go version
1.23.1
is invalid as it doesn't exist. The latest stable version of Go is 1.22.x. Please update to a valid Go version.-go 1.23.1 +go 1.22x/epochs/go.mod (1)
Line range hint
166-173
: Track TODO for module separation.The TODO comment indicates pending work to separate all modules. This should be tracked to ensure it's addressed in future updates.
Would you like me to create a GitHub issue to track the module separation work?
x/slashing/go.mod (1)
Line range hint
169-176
: Consider cleaning up TODO comment.The TODO comment indicates these replace directives are temporary. Consider creating a tracking issue for removing these once all modules are spun out.
Would you like me to create a GitHub issue to track the cleanup of these replace directives?
x/circuit/go.mod (1)
Line range hint
171-178
: Consider cleaning up TODO comment for replace directives.The TODO comment "remove post spinning out all modules" suggests these replace directives are temporary. Consider:
- Documenting when these will be removed
- Creating a tracking issue for this cleanup
Would you like me to help create a GitHub issue to track the cleanup of these replace directives?
x/accounts/go.mod (1)
10-10
: Document the reason for dependency upgrade.Consider adding a note in the commit message explaining why this upgrade was necessary, particularly its relationship to the AutoCLI support fix. This will help with future maintenance and debugging.
x/mint/go.mod (1)
Line range hint
171-179
: Consider documenting the module extraction plan.The TODO comment indicates a plan to spin out all modules. Consider creating a tracking issue to document the timeline and dependencies for this architectural change.
Would you like me to help create a GitHub issue to track the module extraction plan?
go.mod (1)
10-10
: Document dependency upgrade rationale.Consider adding a comment in the PR description or commit message explaining why the
depinject
upgrade was necessary for the AutoCLI fix. This helps future maintainers understand the relationship between the dependency change and the functionality it enables.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
⛔ Files ignored due to path filters (33)
client/v2/go.sum
is excluded by!**/*.sum
go.sum
is excluded by!**/*.sum
orm/go.sum
is excluded by!**/*.sum
runtime/v2/go.sum
is excluded by!**/*.sum
server/v2/cometbft/go.sum
is excluded by!**/*.sum
simapp/go.sum
is excluded by!**/*.sum
simapp/v2/go.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
tests/systemtests/go.sum
is excluded by!**/*.sum
tools/confix/go.sum
is excluded by!**/*.sum
tools/cosmovisor/go.sum
is excluded by!**/*.sum
tools/hubl/go.sum
is excluded by!**/*.sum
x/accounts/defaults/base/go.sum
is excluded by!**/*.sum
x/accounts/defaults/lockup/go.sum
is excluded by!**/*.sum
x/accounts/defaults/multisig/go.sum
is excluded by!**/*.sum
x/accounts/go.sum
is excluded by!**/*.sum
x/authz/go.sum
is excluded by!**/*.sum
x/bank/go.sum
is excluded by!**/*.sum
x/circuit/go.sum
is excluded by!**/*.sum
x/consensus/go.sum
is excluded by!**/*.sum
x/distribution/go.sum
is excluded by!**/*.sum
x/epochs/go.sum
is excluded by!**/*.sum
x/evidence/go.sum
is excluded by!**/*.sum
x/feegrant/go.sum
is excluded by!**/*.sum
x/gov/go.sum
is excluded by!**/*.sum
x/group/go.sum
is excluded by!**/*.sum
x/mint/go.sum
is excluded by!**/*.sum
x/nft/go.sum
is excluded by!**/*.sum
x/params/go.sum
is excluded by!**/*.sum
x/protocolpool/go.sum
is excluded by!**/*.sum
x/slashing/go.sum
is excluded by!**/*.sum
x/staking/go.sum
is excluded by!**/*.sum
x/upgrade/go.sum
is excluded by!**/*.sum
📒 Files selected for processing (34)
client/v2/autocli/app.go
(5 hunks)client/v2/go.mod
(2 hunks)go.mod
(1 hunks)orm/go.mod
(1 hunks)runtime/v2/go.mod
(1 hunks)server/v2/cometbft/go.mod
(1 hunks)simapp/go.mod
(1 hunks)simapp/v2/go.mod
(1 hunks)tests/go.mod
(1 hunks)tests/systemtests/go.mod
(1 hunks)tools/confix/go.mod
(1 hunks)tools/cosmovisor/go.mod
(1 hunks)tools/hubl/go.mod
(1 hunks)x/accounts/defaults/base/go.mod
(1 hunks)x/accounts/defaults/lockup/go.mod
(1 hunks)x/accounts/defaults/multisig/go.mod
(1 hunks)x/accounts/go.mod
(1 hunks)x/authz/go.mod
(1 hunks)x/bank/go.mod
(1 hunks)x/circuit/go.mod
(1 hunks)x/consensus/go.mod
(1 hunks)x/distribution/go.mod
(1 hunks)x/epochs/go.mod
(1 hunks)x/evidence/go.mod
(1 hunks)x/feegrant/go.mod
(1 hunks)x/gov/go.mod
(1 hunks)x/group/go.mod
(1 hunks)x/mint/go.mod
(1 hunks)x/nft/go.mod
(1 hunks)x/params/go.mod
(1 hunks)x/protocolpool/go.mod
(1 hunks)x/slashing/go.mod
(1 hunks)x/staking/go.mod
(1 hunks)x/upgrade/go.mod
(1 hunks)
✅ Files skipped from review due to trivial changes (7)
- tests/systemtests/go.mod
- tools/confix/go.mod
- tools/cosmovisor/go.mod
- tools/hubl/go.mod
- x/group/go.mod
- x/params/go.mod
- x/protocolpool/go.mod
🚧 Files skipped from review as they are similar to previous changes (2)
- client/v2/autocli/app.go
- client/v2/go.mod
🧰 Additional context used
📓 Path-based instructions (1)
tests/go.mod (1)
Pattern tests/**/*
: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
🔇 Additional comments (26)
orm/go.mod (1)
9-9
: LGTM! Version update looks good.
The update of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 follows semantic versioning, suggesting backward compatibility.
Let's verify that this version is consistent across other modules:
✅ Verification successful
Version consistency verified across all modules
The verification shows that cosmossdk.io/depinject v1.1.0
is consistently used across all modules in the repository, including both direct dependencies and indirect ones. This confirms that the version update is properly synchronized throughout the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check depinject version consistency across all go.mod files
# Expected: All modules should use v1.1.0
echo "Checking depinject version consistency across modules..."
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | while read -r file; do
echo "=== $file ==="
grep "cosmossdk.io/depinject" "$file"
done
Length of output: 5806
runtime/v2/go.mod (1)
17-17
: Verify the necessity of depinject version update.
The update of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 appears to be part of the AutoCLI support fixes.
Let's verify the version consistency across dependent modules and check the changelog for relevant fixes:
✅ Verification successful
Depinject v1.1.0 update is consistently applied across all modules
The version update to cosmossdk.io/depinject v1.1.0
is consistently applied across all modules in the codebase, showing a coordinated dependency update. Since this is a minor version bump (v1.0.0 to v1.1.0), it maintains backward compatibility according to semantic versioning principles.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify depinject version consistency across modules and check changelog
# Test 1: Check depinject version across all go.mod files
echo "Checking depinject version consistency:"
fd -e mod -x grep -l "cosmossdk.io/depinject"
# Test 2: Look for AutoCLI related changes in depinject v1.1.0
echo -e "\nChecking for AutoCLI related changes:"
gh release view v1.1.0 --repo cosmossdk.io/depinject
Length of output: 1075
Script:
#!/bin/bash
# Let's check the actual version of depinject in these go.mod files
echo "Checking depinject versions across modules:"
fd -e mod -x grep "cosmossdk.io/depinject" {}
# Also check if there are any direct references to AutoCLI features that might depend on depinject
echo -e "\nChecking for AutoCLI usage with depinject:"
rg -l "AutoCLI.*depinject"
Length of output: 1411
x/accounts/defaults/lockup/go.mod (1)
21-21
: LGTM on depinject update, verify cross-module compatibility.
The update of cosmossdk.io/depinject
to v1.1.0 aligns with the PR's objective to fix AutoCLI support. Since this is part of a broader update across multiple modules, please ensure all modules are updated consistently.
Let's verify the consistency of depinject versions across all modules:
✅ Verification successful
Verified: depinject v1.1.0 is consistently used across all modules
The verification shows that cosmossdk.io/depinject v1.1.0
is uniformly used across all modules in the codebase, including the main go.mod
and all submodules. This confirms that the dependency update is consistent and properly synchronized.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any inconsistencies in depinject versions across modules
# Expected: All modules should use v1.1.0
# Find all go.mod files and check depinject versions
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | \
xargs grep "cosmossdk.io/depinject"
Length of output: 1926
x/staking/go.mod (1)
10-10
: Verify depinject version compatibility.
The update to cosmossdk.io/depinject v1.1.0
aligns with the PR's objective to fix AutoCLI support. However, let's verify the version compatibility across all modules.
✅ Verification successful
Depinject version v1.1.0 is consistently used across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all modules in the codebase, including:
- All x/* modules (staking, upgrade, slashing, etc.)
- Runtime, simapp, and client implementations
- Tools and test packages
This consistent version alignment ensures compatibility and proper functioning of the AutoCLI support.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify consistent depinject version across all modules
# Expected: All modules should use v1.1.0 to maintain compatibility
echo "Checking depinject version across modules..."
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | while read -r file; do
echo "=== $file ==="
grep "cosmossdk.io/depinject" "$file"
done
Length of output: 5782
x/bank/go.mod (2)
9-9
: LGTM: Dependency upgrade looks good.
The upgrade of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 is a minor version bump that should maintain backward compatibility while addressing the AutoCLI support regression.
9-9
: Verify dependency version consistency.
Let's ensure this version upgrade is consistently applied across all relevant modules.
✅ Verification successful
Dependency version is consistent across all modules
The verification shows that all modules in the repository consistently use cosmossdk.io/depinject v1.1.0
. This includes both direct dependencies and indirect dependencies (marked with // indirect
).
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for consistent depinject version across modules
# Expected: All modules should use v1.1.0
echo "Checking depinject version across go.mod files..."
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | while read -r file; do
echo "=== $file ==="
grep "cosmossdk.io/depinject" "$file"
done
Length of output: 5792
x/consensus/go.mod (1)
10-10
: Verify depinject version update impact
The update of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 appears to be part of a coordinated upgrade across multiple modules to support the new AutoCLI implementation. While this is a minor version update and should maintain backward compatibility, we should verify its integration.
✅ Verification successful
Consistent depinject v1.1.0 version verified across all modules
The verification shows that all modules in the codebase consistently use cosmossdk.io/depinject v1.1.0
. This includes core modules, tools, tests, and client packages, confirming proper version alignment across the entire codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify consistent depinject version across related modules
# Expected: All modules should use the same version v1.1.0
echo "Checking depinject version consistency across modules..."
rg -l 'cosmossdk.io/depinject' | xargs rg 'cosmossdk.io/depinject v\d+\.\d+\.\d+'
Length of output: 8532
x/evidence/go.mod (1)
10-10
: LGTM: Consistent dependency update.
The update of cosmossdk.io/depinject
to v1.1.0 aligns with the coordinated version bump across modules to support the AutoCLI fixes.
Let's verify the consistency of this version across other modules:
✅ Verification successful
Verified: Consistent depinject v1.1.0 across all modules
The verification confirms that all modules in the codebase consistently use cosmossdk.io/depinject v1.1.0
, including the main module, x/ modules, tools, tests, and simapp. This update is properly synchronized across the entire codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if all modules use the same depinject version
# Expected: All modules should use v1.1.0
# Find all go.mod files and check depinject version
fd --type f "go.mod$" --exec grep -H "cosmossdk.io/depinject"
Length of output: 1897
x/epochs/go.mod (1)
10-10
: LGTM: Dependency version update is consistent.
The upgrade of cosmossdk.io/depinject
to v1.1.0 aligns with the coordinated dependency updates across modules to support AutoCLI fixes.
Let's verify the consistency of this upgrade across related modules:
✅ Verification successful
Dependency version update verified: All modules consistently use depinject v1.1.0
The verification confirms that all modules in the codebase are using cosmossdk.io/depinject v1.1.0
, showing a coordinated and consistent dependency update across the entire project. This alignment supports the AutoCLI fixes as intended.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that depinject version is consistent across all modules
# Expected: All modules should use v1.1.0
# Search for depinject version declarations in all go.mod files
fd -e mod -x rg "cosmossdk.io/depinject v\d+\.\d+\.\d+"
Length of output: 1164
x/authz/go.mod (1)
8-8
: LGTM! Verify consistency across modules.
The update of cosmossdk.io/depinject
to v1.1.0 is appropriate for fixing the AutoCLI support regression. This minor version bump suggests backward-compatible changes.
Let's verify that this version is consistent across all modules:
✅ Verification successful
Version consistency verified across all modules
All modules in the codebase consistently use cosmossdk.io/depinject v1.1.0
, including both direct dependencies and indirect ones. The version bump is uniform across the entire codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check depinject version consistency across all go.mod files
# Expected: All modules should use the same version v1.1.0
echo "Checking depinject version consistency..."
find . -name "go.mod" -type f -exec grep -l "cosmossdk.io/depinject" {} \; | while read -r file; do
echo "=== $file ==="
grep "cosmossdk.io/depinject" "$file"
done
Length of output: 5797
x/nft/go.mod (1)
8-8
: LGTM: Dependency update aligns with AutoCLI fix.
The update of cosmossdk.io/depinject
to v1.1.0 is consistent with the PR's objective to fix AutoCLI support regression. This change appears to be part of a coordinated update across multiple modules.
Let's verify the consistency of this dependency version across related modules:
✅ Verification successful
Verified: Consistent depinject v1.1.0 version across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all modules in the codebase, including tools, tests, and core x/ modules. This uniform version alignment supports the coordinated update for the AutoCLI support fix.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if depinject version is consistent across all modules
# Expected: All modules should use v1.1.0
# Search for depinject version declarations in all go.mod files
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | xargs grep "cosmossdk.io/depinject"
Length of output: 1926
x/slashing/go.mod (1)
10-10
: LGTM on depinject upgrade, but let's verify compatibility.
The upgrade to cosmossdk.io/depinject v1.1.0
aligns with the PR's goal of fixing AutoCLI support. This change is part of a coordinated upgrade across multiple modules.
Let's verify that this version is compatible with other dependencies:
✅ Verification successful
Dependency version is consistent across all modules
The verification shows that all modules in the codebase are using cosmossdk.io/depinject v1.1.0
, with no version conflicts or inconsistencies. The upgrade is uniformly applied across the entire codebase, including all x/ modules, tools, tests, and the main module.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any potential version conflicts with depinject v1.1.0
# Search for any other modules requiring different versions of depinject
fd -e mod | xargs rg "cosmossdk.io/depinject v[^1].* // indirect"
# Check if any replace directives affect depinject
fd -e mod | xargs rg "replace.*cosmossdk.io/depinject"
Length of output: 124
Script:
#!/bin/bash
# Let's try a different approach to check dependency compatibility
# Check all go.mod files for depinject versions
fd -e mod | xargs rg "cosmossdk.io/depinject"
# Also check go.sum for any version conflicts
fd -e sum | xargs rg "cosmossdk.io/depinject"
# Check for any imports of depinject to understand usage
rg -t go "\"cosmossdk.io/depinject\""
Length of output: 12765
x/circuit/go.mod (1)
10-10
: LGTM: Consistent dependency update across modules.
The update of cosmossdk.io/depinject
to v1.1.0 aligns with the changes in other modules and supports the AutoCLI improvements.
Let's verify the consistency of this dependency version across other modules:
✅ Verification successful
Dependency version is consistent across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all modules in the codebase, including:
- Main module (
go.mod
) - All x/ modules (circuit, upgrade, staking, etc.)
- Tools (hubl, cosmovisor, confix)
- Tests and simulation apps
- Runtime and client modules
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check depinject version consistency across modules
# Expected: All modules should use v1.1.0
# Search for depinject version declarations in go.mod files
fd -e mod -x grep -l "cosmossdk.io/depinject" {} \; | xargs grep "cosmossdk.io/depinject"
Length of output: 1926
x/distribution/go.mod (1)
10-10
: LGTM: Consistent dependency upgrade across modules.
The upgrade of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 aligns with the coordinated update across multiple modules to support the AutoCLI fixes.
Let's verify the version consistency across other modules:
✅ Verification successful
Verified: Consistent depinject v1.1.0 version across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all modules in the codebase, including:
- All x/* modules
- Tools (hubl, cosmovisor, confix)
- Tests and simapp
- Runtime and client packages
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that all modules use the same depinject version
# Expected: All modules should use v1.1.0
# Find all go.mod files and check depinject version
fd --type f "go.mod$" --exec grep -H "cosmossdk.io/depinject"
Length of output: 1897
x/accounts/go.mod (1)
10-10
: Verify depinject upgrade compatibility.
The upgrade from cosmossdk.io/depinject v1.0.0
to v1.1.0
looks good. Since this is related to fixing AutoCLI support regression, please ensure all dependent modules using depinject features have been tested with the new version.
✅ Verification successful
Depinject v1.1.0 upgrade is consistently applied across the codebase
The verification shows that all modules in the codebase are already using cosmossdk.io/depinject v1.1.0
. There are no instances of v1.0.0 remaining, indicating that the upgrade has been properly synchronized across all dependencies.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any other modules that might need the same upgrade
# Look for other go.mod files that might still be using the old version
fd -e mod -x grep -l "cosmossdk.io/depinject v1.0.0" {}
Length of output: 59
Script:
#!/bin/bash
# Let's try a different approach to check depinject usage across go.mod files
# First, find all go.mod files
fd -e mod -x cat {} | grep -B1 -A1 "cosmossdk.io/depinject"
Length of output: 4170
x/mint/go.mod (1)
10-10
: LGTM: Dependency upgrade aligns with PR objectives.
The upgrade of cosmossdk.io/depinject
to v1.1.0 is consistent with the coordinated dependency updates across modules and supports the AutoCLI improvements.
x/gov/go.mod (1)
10-10
: Verify compatibility with depinject v1.1.0
The update of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 aligns with the PR's objective to fix AutoCLI support. However, we should verify that this version bump doesn't introduce any breaking changes that could affect the governance module.
✅ Verification successful
Dependency update is safe to proceed
The depinject usage in the gov module is limited to dependency injection patterns and interfaces that are stable across minor version updates:
- Simple interface implementations (
OnePerModuleType
,ManyPerContainerType
) - Standard dependency injection structs and container configuration
- Basic module initialization and configuration
The update from v1.0.0 to v1.1.0 follows semantic versioning, indicating backward compatibility is maintained for minor version bumps. The existing usage patterns in the codebase are fundamental dependency injection features that are unlikely to be affected by this update.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any breaking changes in depinject v1.1.0
# Search for any usage of depinject in the gov module
echo "Searching for depinject usage patterns..."
rg -l "depinject\." x/gov/
# Look for any migration guides or breaking changes
echo "Checking for breaking changes in depinject..."
gh release view v1.1.0 --repo cosmossdk.io/depinject
Length of output: 455
Script:
#!/bin/bash
# Let's examine the actual usage of depinject in the gov module files
echo "Checking depinject usage in content.go..."
rg "depinject" x/gov/types/v1beta1/content.go -B 2 -A 2
echo "Checking depinject usage in expected_keepers.go..."
rg "depinject" x/gov/types/expected_keepers.go -B 2 -A 2
echo "Checking depinject usage in depinject.go..."
cat x/gov/depinject.go
# Let's also check the go.mod history to see the previous version
echo "Checking previous depinject version..."
git log -p x/gov/go.mod | grep "cosmossdk.io/depinject"
Length of output: 4655
x/accounts/defaults/base/go.mod (1)
9-9
: LGTM: Consistent depinject upgrade
The upgrade of cosmossdk.io/depinject
from v1.0.0 to v1.1.0 aligns with the PR objectives to fix AutoCLI support regression. This minor version bump should maintain backward compatibility.
Let's verify this upgrade is consistent across the codebase:
✅ Verification successful
Dependency upgrade verified: depinject v1.1.0 consistently used across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all go.mod files in the codebase, including:
- Main module
- All x/ modules
- Tools and testing modules
- Runtime and client modules
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify depinject version consistency across all go.mod files
# Expected: All go.mod files should use v1.1.0
# Search for depinject version declarations in all go.mod files
rg "cosmossdk.io/depinject v\d+\.\d+\.\d+" -g "go.mod"
Length of output: 1775
x/accounts/defaults/multisig/go.mod (1)
23-23
: LGTM: Dependency update aligns with PR objectives.
The update of cosmossdk.io/depinject
to v1.1.0 is part of a coordinated upgrade to support AutoCLI fixes.
Let's verify the consistency of this dependency update across the codebase:
✅ Verification successful
Dependency version consistency verified across codebase
The verification confirms that cosmossdk.io/depinject v1.1.0
is consistently used across all go.mod files in the repository, both as direct and indirect dependencies. This uniform version alignment supports the PR's objective of fixing AutoCLI support.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if depinject version is consistent across all go.mod files
# Expected: All go.mod files should use the same version v1.1.0
echo "Checking depinject version across go.mod files..."
fd --type f --glob 'go.mod' --exec rg 'cosmossdk.io/depinject\s+v\d+\.\d+\.\d+'
Length of output: 1295
x/feegrant/go.mod (1)
10-10
: LGTM: Dependency update aligns with AutoCLI fixes.
The update of cosmossdk.io/depinject
to v1.1.0 is consistent with the PR's objective to fix AutoCLI support regression.
Let's verify that this version is consistently updated across all modules:
✅ Verification successful
✅ Verified: depinject v1.1.0 is consistently used across all modules
The verification shows that cosmossdk.io/depinject v1.1.0
is uniformly used across all modules in the codebase, including:
- All x/* modules
- Core components (client, runtime, server)
- Testing and tooling packages
- The root module
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any inconsistencies in depinject versions across modules
# Expected: All modules should use v1.1.0
# Search for depinject version declarations in all go.mod files
find . -name "go.mod" -type f -exec grep -H "cosmossdk.io/depinject" {} \;
Length of output: 1911
server/v2/cometbft/go.mod (1)
47-47
: LGTM! Verify depinject version consistency.
The upgrade of cosmossdk.io/depinject
to v1.1.0 aligns with the PR's objective to fix AutoCLI support.
Let's verify that this version is consistent across related modules:
✅ Verification successful
Dependency version consistency verified across all modules
All modules in the codebase consistently use cosmossdk.io/depinject v1.1.0
, including both direct and indirect dependencies. The upgrade in server/v2/cometbft/go.mod
maintains this consistency.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check depinject version consistency across modules
# Expected: All modules should use v1.1.0
# Find all go.mod files and check depinject version
fd --type f "go.mod$" --exec grep -l "cosmossdk.io/depinject" {} \; | \
xargs awk '/cosmossdk.io\/depinject/ {print FILENAME ":" $0}'
Length of output: 1970
go.mod (1)
10-10
: Verify depinject upgrade's relation to AutoCLI fix.
The upgrade from cosmossdk.io/depinject v1.0.0
to v1.1.0
appears to be coordinated across multiple modules. Since this PR aims to fix AutoCLI support regression, please verify if this upgrade is specifically required for the flag initialization fixes.
✅ Verification successful
Depinject upgrade is related to AutoCLI changes
The upgrade from depinject v1.0.0
to v1.1.0
is directly related to AutoCLI changes, as evidenced by the modifications in client/v2/autocli/app.go
. The changes show a refactoring of the dependency injection structure for AutoCLI options, which aligns with the PR's goal to fix AutoCLI support regression.
- The
Options
struct is renamed toAppOptions
and its implementation is streamlined - Dependency injection setup is simplified by removing the separate
ProvideAppOptions
function - These changes improve the initialization of AutoCLI components, which is relevant to the reported flag initialization issues
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if depinject v1.1.0 contains relevant changes for AutoCLI
# Expected: Find changes related to initialization or flag handling
# Search for relevant commits in depinject v1.1.0
gh api repos/cosmos/cosmos-sdk/compare/depinject/v1.0.0...v1.1.0 | jq -r '.commits[].commit.message' | grep -i "autocli\|flag\|init"
Length of output: 217
Script:
#!/bin/bash
# Let's try a different approach to understand the depinject upgrade impact
# 1. Check for any changes in imports or usage of depinject in the codebase
rg -l "cosmossdk.io/depinject"
# 2. Look for any AutoCLI related changes in the PR
rg -l "AutoCLI|autocli"
# 3. Check go.mod changes to see if this is part of a larger upgrade
git diff HEAD~1 go.mod
Length of output: 7741
Script:
#!/bin/bash
# Let's check the actual changes in the AutoCLI related files
git diff HEAD~1 client/v2/autocli/
git diff HEAD~1 runtime/services/autocli.go
git diff HEAD~1 runtime/v2/services/autocli.go
# Also check if there are any changes in depinject that might affect AutoCLI
git log -p HEAD~1..HEAD -- depinject/
Length of output: 2055
x/upgrade/go.mod (1)
9-9
: LGTM! Verify version consistency across modules.
The update of cosmossdk.io/depinject
to v1.1.0 is appropriate for addressing the AutoCLI support regression.
Let's verify that this version is consistent across related modules:
✅ Verification successful
Version consistency verified across all modules
All modules in the codebase consistently use cosmossdk.io/depinject v1.1.0
, including both direct and indirect dependencies. This confirms that the version update in x/upgrade/go.mod
is properly aligned with the rest of the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check depinject version consistency across modules
# Expected: All modules should use v1.1.0
echo "Checking depinject version across go.mod files..."
fd --type f --glob 'go.mod' --exec grep -l 'cosmossdk.io/depinject' {} \; | \
xargs grep 'cosmossdk.io/depinject'
Length of output: 2055
tests/go.mod (1)
9-9
: LGTM! Dependency upgrade is consistent with PR objectives.
The upgrade of cosmossdk.io/depinject
to v1.1.0 aligns with the goal of fixing AutoCLI support regression.
Let's verify that this version is consistent across other modules:
✅ Verification successful
✅ Verified: depinject v1.1.0 is consistently used across all modules
The version upgrade to cosmossdk.io/depinject v1.1.0
in tests/go.mod
is consistent with all other modules in the codebase. All 33 modules that depend on depinject
are using the same version v1.1.0, showing proper version alignment across the entire project.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if depinject version is consistent across all go.mod files
# Expected: All go.mod files should use the same version v1.1.0
# Search for depinject version in all go.mod files
rg "cosmossdk.io/depinject v\d+\.\d+\.\d+" --type go-mod
Length of output: 89
Script:
#!/bin/bash
# Let's try a different approach to find all go.mod files and check their content
fd "go.mod$" --type f --exec grep -H "cosmossdk.io/depinject"
Length of output: 1897
simapp/go.mod (1)
11-11
: LGTM: Dependency upgrade aligns with PR objectives.
The upgrade of cosmossdk.io/depinject
to v1.1.0 is part of a coordinated change across multiple modules to support the AutoCLI fixes.
Let's verify this upgrade is consistent across other modules:
✅ Verification successful
Verified: The depinject v1.1.0 upgrade is consistently applied across all modules
The verification confirms that cosmossdk.io/depinject v1.1.0
is uniformly used across all modules in the codebase, including:
- Main modules (simapp, runtime, orm)
- All x/ modules (bank, gov, staking, etc.)
- Tools (hubl, confix, cosmovisor)
- Test modules
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify depinject version consistency across modules
# Expected: All go.mod files should use the same version v1.1.0
# Search for depinject version declarations in all go.mod files
rg "cosmossdk.io/depinject v\d+\.\d+\.\d+" -g "go.mod"
Length of output: 1775
simapp/v2/go.mod (1)
9-9
: Verify consistent depinject version across modules
The update to cosmossdk.io/depinject v1.1.0
aligns with the PR's objective to fix AutoCLI support. Let's verify this version is used consistently across related modules.
✅ Verification successful
Consistent depinject v1.1.0 version confirmed across all modules
The verification shows that cosmossdk.io/depinject v1.1.0
is used consistently across all modules in the codebase, including:
- Main module
- All x/ modules (auth, bank, staking, etc.)
- simapp and simapp/v2
- runtime and runtime/v2
- client/v2
- tools (confix, hubl, cosmovisor)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if depinject v1.1.0 is used consistently across all go.mod files
# Expected: All modules should use the same version v1.1.0
echo "Checking depinject version consistency across modules..."
rg -l 'cosmossdk.io/depinject' | while read -r file; do
echo "=== $file ==="
rg 'cosmossdk.io/depinject v\d+\.\d+\.\d+' "$file"
done
Length of output: 36111
Description
Related: #22409
The new command model regressed support for AutoCLI. Usage info via
--help
and all flags were broken due to the deferred initialization. Similar to how root command is initialized, we now need a skeletal (💀) version of AutoCLI to initialize flags with so that validation doesn't err on the first pass.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
New Features
skipValidation
option in the application settings, allowing users to bypass validation checks.Bug Fixes
Chores
cosmossdk.io/depinject
fromv1.0.0
tov1.1.0
.