-
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
fix(x/accounts/lockup): fix proto path #22319
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
"cosmossdk.io/core/store" | ||
"cosmossdk.io/log" | ||
"cosmossdk.io/math" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Action Required: Update Remaining Import Paths for The old import path
Please update these import statements to use the new versioned package structure. 🔗 Analysis chainLGTM: Import path updated correctly. The import path for To ensure consistency across the codebase, please run the following command to check for any remaining occurrences of the old import path: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining occurrences of the old import path
rg "cosmossdk.io/x/accounts/defaults/lockup/types"
Length of output: 366 |
||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ import ( | |
|
||
"cosmossdk.io/math" | ||
"cosmossdk.io/x/accounts/accountstd" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent Import Paths Detected The old import path
Please update these files to use 🔗 Analysis chainLGTM: Import path updated correctly. The import path for To ensure consistency across the codebase, let's verify the usage of this new import path: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the consistency of the new import path across the codebase.
# Test: Search for the old import path. Expect: No results.
echo "Checking for old import path:"
rg "cosmossdk.io/x/accounts/defaults/lockup/types"
# Test: Search for the new import path. Expect: Consistent usage across relevant files.
echo "Checking for new import path:"
rg "cosmossdk.io/x/accounts/defaults/lockup/v1"
Length of output: 2443 |
||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
"cosmossdk.io/core/store" | ||
"cosmossdk.io/log" | ||
"cosmossdk.io/math" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent Import Paths Detected The following files still use the old import path
🔗 Analysis chainLGTM: Import path updated correctly. The import path for To ensure consistency across the codebase, please run the following command: This will help identify any remaining instances of the old import path that may need updating. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Verify consistent usage of the new import path
rg -g '*.go' 'cosmossdk\.io/x/accounts/defaults/lockup/(types|v1)'
Length of output: 1887 |
||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import ( | |
|
||
"cosmossdk.io/core/store" | ||
"cosmossdk.io/math" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent import paths found for The following files are still using the old import path
Please update these import statements to ensure consistency across the codebase. 🔗 Analysis chainLGTM: Import path updated to use versioned package. The change from To ensure consistency across the codebase, please run the following command: This command will search for any remaining imports that don't use the new v1 path. The results should be empty if the change has been applied consistently. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Verify that all imports of lockuptypes use the new v1 path
rg -g '*.go' 'cosmossdk\.io/x/accounts/defaults/lockup/(?!v1)' --stats
Length of output: 364 Script: #!/bin/bash
# Find all .go files with imports of lockuptypes not using the v1 path
# Extract lines with the lockup import path
rg 'cosmossdk\.io/x/accounts/defaults/lockup/' -g '*.go' > all_lockup_imports.txt
# Exclude the v1 path
grep -v 'lockup/v1' all_lockup_imports.txt > invalid_imports.txt
# Output the result
if [ -s invalid_imports.txt ]; then
echo "Found imports not using the v1 path:"
cat invalid_imports.txt
else
echo "All lockuptypes imports use the v1 path."
fi
Length of output: 734 |
||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import ( | |
errorsmod "cosmossdk.io/errors" | ||
"cosmossdk.io/math" | ||
"cosmossdk.io/x/accounts/accountstd" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Old lockuptypes import paths still present in tests:
🔗 Analysis chainVerify the impact of the lockuptypes import change. The import path for To verify the impact, run the following script: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any incompatibilities or changes required due to the new lockuptypes import.
# Test: Search for all usages of lockuptypes in the file
rg 'lockuptypes\.' x/accounts/defaults/lockup/periodic_locking_account.go
# Test: Check if there are any compilation errors due to the import change
go build ./x/accounts/defaults/lockup/...
Length of output: 295 Script: #!/bin/bash
# Description: Verify that the lockuptypes import path has been updated consistently and no old references remain.
# Test 1: Ensure the old import path does not exist anywhere in the codebase
echo "Checking for old import path 'cosmossdk.io/x/accounts/defaults/lockup/types'..."
rg 'cosmossdk.io/x/accounts/defaults/lockup/types' || echo "No occurrences of the old import path found."
# Test 2: Ensure the new import path is used consistently
echo "Checking for new import path 'cosmossdk.io/x/accounts/defaults/lockup/v1'..."
rg 'cosmossdk.io/x/accounts/defaults/lockup/v1' || echo "No occurrences of the new import path found."
# Test 3: Find all usages of lockuptypes to verify compatibility
echo "Finding all usages of 'lockuptypes'..."
rg 'lockuptypes\.'
Length of output: 16958 |
||
|
||
"github.com/cosmos/cosmos-sdk/codec" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import ( | |
"cosmossdk.io/core/store" | ||
"cosmossdk.io/log" | ||
"cosmossdk.io/math" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/types" | ||
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Remaining Old Import Paths Found in Test Files The following test files still import
🔗 Analysis chainLGTM: Import path updated correctly. The import path for To ensure consistency across the codebase, please run the following command to check for any remaining occurrences of the old import path: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining occurrences of the old import path
rg "cosmossdk.io/x/accounts/defaults/lockup/types" --type go
Length of output: 376 |
||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
💡 Codebase verification
Inconsistent import paths for
types
package.The import path for the
types
package varies betweencosmossdk.io/x/accounts/defaults/lockup/v1
andcosmossdk.io/x/accounts/defaults/lockup/types
across different files. To maintain consistency and prevent potential issues, please standardize all import paths to use eitherv1
ortypes
consistently throughout the codebase.Affected files:
🔗 Analysis chain
Import path updated correctly.
The import path for the
types
package has been updated fromcosmossdk.io/x/accounts/defaults/lockup/types
tocosmossdk.io/x/accounts/defaults/lockup/v1
. This change aligns with the PR objective to fix the proto path and is consistent with similar changes in other files of this PR.However, there's an ongoing discussion about whether to use "v1" or "types" in the import path. While "v1" is consistent with prior implementations, it might be worth considering using "types" for clarity if that's the preferred convention moving forward.
To ensure consistency across the codebase, let's verify the usage of this import path:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1976