-
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
refactor: bump gogoproto #19869
refactor: bump gogoproto #19869
Conversation
WalkthroughWalkthroughThe overall change involves updating various protobuf definitions across multiple modules within a Cosmos SDK-based project. Specifically, the updates replace references from Changes
Assessment against linked issues
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 (
|
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.
Review Status
Actionable comments generated: 5
Configuration used: .coderabbit.yml
Files selected for processing (74)
- baseapp/grpcrouter_test.go (1 hunks)
- baseapp/testutil/buf.gen.yaml (1 hunks)
- client/grpc/cmtservice/query.pb.go (12 hunks)
- codec/amino.go (2 hunks)
- codec/any_test.go (1 hunks)
- codec/json.go (2 hunks)
- codec/types/any.go (1 hunks)
- codec/types/any_internal_test.go (1 hunks)
- codec/types/interface_registry.go (6 hunks)
- codec/types/types_test.go (6 hunks)
- codec/yaml_test.go (4 hunks)
- crypto/keyring/record.pb.go (5 hunks)
- crypto/keys/multisig/keys.pb.go (3 hunks)
- proto/buf.gen.gogo.yaml (1 hunks)
- proto/buf.lock (1 hunks)
- store/db/pebbledb.go (2 hunks)
- store/db/rocksdb_noflag.go (3 hunks)
- store/root/migrate_test.go (1 hunks)
- tests/integration/tx/internal/buf.gen.gogo.yaml (1 hunks)
- testutil/testdata/buf.gen.gogo.yaml (1 hunks)
- testutil/testdata/codec.go (1 hunks)
- testutil/testdata/grpc_query.go (3 hunks)
- testutil/testdata/query.pb.go (4 hunks)
- testutil/testdata/testdata.pb.go (9 hunks)
- testutil/testdata/unknonwnproto.pb.go (33 hunks)
- types/abci.pb.go (16 hunks)
- types/tx/signing/signing.pb.go (7 hunks)
- types/tx/tx.pb.go (19 hunks)
- x/accounts/defaults/lockup/types/tx.pb.go (4 hunks)
- x/accounts/proto/buf.gen.gogo.yaml (1 hunks)
- x/accounts/v1/query.pb.go (7 hunks)
- x/accounts/v1/tx.pb.go (18 hunks)
- x/auth/migrations/legacytx/stdtx.go (2 hunks)
- x/auth/proto/buf.gen.gogo.yaml (1 hunks)
- x/auth/signing/adapter.go (1 hunks)
- x/auth/types/auth.pb.go (3 hunks)
- x/auth/types/genesis.pb.go (4 hunks)
- x/auth/types/query.pb.go (13 hunks)
- x/authz/authz.pb.go (5 hunks)
- x/authz/proto/buf.gen.gogo.yaml (1 hunks)
- x/authz/tx.pb.go (3 hunks)
- x/bank/proto/buf.gen.gogo.yaml (1 hunks)
- x/circuit/proto/buf.gen.gogo.yaml (1 hunks)
- x/consensus/proto/buf.gen.gogo.yaml (1 hunks)
- x/counter/proto/buf.gen.gogo.yaml (1 hunks)
- x/crisis/proto/buf.gen.gogo.yaml (1 hunks)
- x/distribution/proto/buf.gen.gogo.yaml (1 hunks)
- x/evidence/proto/buf.gen.gogo.yaml (1 hunks)
- x/evidence/types/genesis.pb.go (4 hunks)
- x/evidence/types/query.pb.go (7 hunks)
- x/evidence/types/tx.pb.go (3 hunks)
- x/feegrant/feegrant.pb.go (6 hunks)
- x/feegrant/proto/buf.gen.gogo.yaml (1 hunks)
- x/feegrant/tx.pb.go (4 hunks)
- x/genutil/proto/buf.gen.gogo.yaml (1 hunks)
- x/gov/proto/buf.gen.gogo.yaml (1 hunks)
- x/gov/types/v1/gov.pb.go (4 hunks)
- x/gov/types/v1/tx.pb.go (15 hunks)
- x/gov/types/v1beta1/gov.pb.go (3 hunks)
- x/gov/types/v1beta1/tx.pb.go (5 hunks)
- x/group/proto/buf.gen.gogo.yaml (1 hunks)
- x/group/tx.pb.go (9 hunks)
- x/group/types.pb.go (5 hunks)
- x/mint/proto/buf.gen.gogo.yaml (1 hunks)
- x/nft/nft.pb.go (7 hunks)
- x/nft/proto/buf.gen.gogo.yaml (1 hunks)
- x/params/proto/buf.gen.gogo.yaml (1 hunks)
- x/protocolpool/proto/buf.gen.gogo.yaml (1 hunks)
- x/slashing/proto/buf.gen.gogo.yaml (1 hunks)
- x/staking/proto/buf.gen.gogo.yaml (1 hunks)
- x/staking/types/staking.pb.go (12 hunks)
- x/staking/types/tx.pb.go (11 hunks)
- x/upgrade/proto/buf.gen.gogo.yaml (1 hunks)
- x/upgrade/types/upgrade.pb.go (3 hunks)
Path instructions used (47)
tests/integration/tx/internal/buf.gen.gogo.yaml (1)
tests/**/*
Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull requestcodec/yaml_test.go (2)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*_test.go
Assess the unit test code assessing sufficient code coverage for the changes associated in the pull requestcodec/json.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.testutil/testdata/codec.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.codec/types/any_internal_test.go (2)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*_test.go
Assess the unit test code assessing sufficient code coverage for the changes associated in the pull requestx/auth/signing/adapter.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.testutil/testdata/grpc_query.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.store/db/rocksdb_noflag.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.codec/any_test.go (2)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*_test.go
Assess the unit test code assessing sufficient code coverage for the changes associated in the pull requestcodec/amino.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/migrations/legacytx/stdtx.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.codec/types/types_test.go (2)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*_test.go
Assess the unit test code assessing sufficient code coverage for the changes associated in the pull requeststore/db/pebbledb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.baseapp/grpcrouter_test.go (2)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
**/*_test.go
Assess the unit test code assessing sufficient code coverage for the changes associated in the pull requestx/evidence/types/genesis.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.crypto/keys/multisig/keys.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/types/genesis.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.codec/types/interface_registry.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/evidence/types/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/nft/nft.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/authz/authz.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/evidence/types/query.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.crypto/keyring/record.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/types/auth.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.testutil/testdata/query.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/upgrade/types/upgrade.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/feegrant/feegrant.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/feegrant/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.types/tx/signing/signing.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.testutil/testdata/testdata.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/authz/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/gov/types/v1beta1/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/accounts/v1/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/accounts/v1/query.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/accounts/defaults/lockup/types/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/gov/types/v1beta1/gov.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.types/abci.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.types/tx/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/group/types.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/staking/types/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/auth/types/query.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/gov/types/v1/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.client/grpc/cmtservice/query.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/gov/types/v1/gov.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/group/tx.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/staking/types/staking.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.testutil/testdata/unknonwnproto.pb.go (1)
**/*.go
Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Files skipped from review due to trivial changes (2)
- codec/types/any.go
- store/root/migrate_test.go
Additional comments (207)
baseapp/testutil/buf.gen.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
aligns with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.testutil/testdata/buf.gen.gogo.yaml (1)
- 6-6: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/accounts/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
aligns with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/auth/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/authz/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/bank/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/circuit/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/consensus/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Please ensure the path is correct and verify compatibility with existing code.x/counter/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to reference
github.com/cosmos/gogoproto/types/any
in thegocosmos
plugin option aligns with the PR's objectives of migrating to the newerany
type. Ensure this change is consistently applied across all modules to maintain compatibility.x/crisis/proto/buf.gen.gogo.yaml (1)
- 5-5: Identical to the previous file, the update to reference
github.com/cosmos/gogoproto/types/any
is consistent with the PR's objectives. Ensure uniform application of this change across all modules.x/distribution/proto/buf.gen.gogo.yaml (1)
- 5-5: As with the previous files, updating the plugin option to reference
github.com/cosmos/gogoproto/types/any
is in line with the migration objectives. Consistency in these updates across all affected modules is crucial.x/evidence/proto/buf.gen.gogo.yaml (1)
- 5-5: This file's update to the
gocosmos
plugin option, referencinggh.neting.cc/cosmos/gogoproto/types/any
, is consistent with the overarching migration strategy. A comprehensive consistency check across all modules is recommended to ensure uniform application.x/feegrant/proto/buf.gen.gogo.yaml (1)
- 5-5: Updating the
gocosmos
plugin option to referencegh.neting.cc/cosmos/gogoproto/types/any
here is consistent with the migration efforts seen in other modules. A thorough review to ensure no old references remain is advisable.x/genutil/proto/buf.gen.gogo.yaml (1)
- 5-5: The update in this file to reference
github.com/cosmos/gogoproto/types/any
continues the consistent migration pattern observed. Additional testing, especially around serialization and deserialization processes, is recommended to ensure no issues arise from these changes.x/gov/proto/buf.gen.gogo.yaml (1)
- 5-5: Like the previous files, updating the
gocosmos
plugin option to referencegh.neting.cc/cosmos/gogoproto/types/any
is part of the broader migration effort. Uniform updates across all modules are essential for a seamless migration.x/group/proto/buf.gen.gogo.yaml (1)
- 5-5: This file's update to the
gocosmos
plugin option, referencinggh.neting.cc/cosmos/gogoproto/types/any
, completes the consistent migration effort observed across all reviewed files. A final review to ensure completeness and consistency across the codebase is recommended.x/mint/proto/buf.gen.gogo.yaml (1)
- 5-5: The update to the plugin option for
gocosmos
to referencegh.neting.cc/cosmos/gogoproto/types/any
aligns with the PR's objectives. Please ensure the new path is correct and compatible with the rest of the codebase.x/nft/proto/buf.gen.gogo.yaml (1)
- 5-5: Identical to the previous file, the update to the plugin option for
gocosmos
is consistent with the PR's objectives. Ensure the new path is correct and does not introduce compatibility issues.x/params/proto/buf.gen.gogo.yaml (1)
- 5-5: As with the previous files, the update to the
gocosmos
plugin option is appropriate. Please verify the correctness and compatibility of the new path.x/slashing/proto/buf.gen.gogo.yaml (1)
- 5-5: This update to the
gocosmos
plugin option follows the pattern seen in previous files. Please verify the new path's correctness and compatibility.x/upgrade/proto/buf.gen.gogo.yaml (1)
- 5-5: Consistent with the previous files, the update to the
gocosmos
plugin option is appropriate. Please verify the new path's correctness and compatibility.tests/integration/tx/internal/buf.gen.gogo.yaml (1)
- 5-5: The update to the
gocosmos
plugin option in this integration test configuration is consistent with the PR's objectives. Ensure the new path's correctness and compatibility.proto/buf.gen.gogo.yaml (1)
- 5-5: The update of plugin references in the
gocosmos
section to use the new paths forany.proto
andorm.proto
aligns with the migration togogoproto/types/any
and the updatedcosmossdk.io/orm
. This change is crucial for ensuring that the protobuf compilation process utilizes the correct versions of these dependencies.codec/yaml_test.go (2)
- 6-6: The update of the import path to
github.com/cosmos/gogoproto/types/any/test
is consistent with the migration to the newgogoproto
types. This change ensures that the tests are using the correct types for YAML marshaling.- 15-15: The updates to the
Dog
andHasAnimal
types in the YAML marshaling tests are correctly reflecting the changes made due to the migration togogoproto/types/any
. The expected YAML output has been appropriately adjusted to match the new type references, ensuring the tests remain valid.Also applies to: 31-31, 41-45
codec/json.go (2)
- 8-8: The import of
gogoprototypes
fromgh.neting.cc/cosmos/gogoproto/types/any
is necessary for the migration to the updatedgogoproto
types. This change ensures that the JSON marshaling process utilizes the correct types.- 24-24: Updating the usage of
types.ProtoJSONPacker
togogoprototypes.ProtoJSONPacker
aligns with the migration to the newgogoproto
types. This ensures that the JSON marshaling process is compatible with the updated types, enhancing serialization and deserialization processes.proto/buf.lock (1)
- 17-18: Updating the commit and digest values for the
googleapis
repository ensures that the protobuf dependencies are aligned with the latest versions. This change is crucial for maintaining compatibility and accessing the latest features and bug fixes from thegoogleapis
.testutil/testdata/codec.go (1)
- 46-53: The updates to the registration of concrete types (
Dog
,Cat
,HasAnimal
,HasHasAnimal
) with the new package paths are necessary for reflecting the migration to the updatedgogoproto
types. This ensures that the type registration is aligned with the changes and maintains the correct behavior in the codebase.codec/types/any_internal_test.go (1)
- 51-51: Replacing the direct manipulation of
any.cachedValue
with a call toany.ResetCachedValue()
in the test is a good practice. It ensures that the test uses the public API of theAny
type, which is more robust and less prone to breakage if the internal implementation ofAny
changes.x/auth/signing/adapter.go (1)
- 30-30: Adding the
signerData
parameter to theGetSignBytesAdapter
function signature is a significant change. Ensure that all calls to this function throughout the codebase have been updated to include the new parameter. This change likely enhances the function's flexibility by allowing it to handle signer data explicitly.Verification successful
To further verify the addition of the
signerData
parameter to theGetSignBytesAdapter
function and its correct usage across the codebase, we need to inspect the parameters passed in each call to this function. Let's proceed with examining a few of these calls more closely.
The review of the new context confirms that the
signerData
parameter has been added to theGetSignBytesAdapter
function signature and that all calls to this function throughout the codebase have been updated to include the new parameter. This verifies the accuracy of the review comment.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for calls to GetSignBytesAdapter to ensure they include the new signerData parameter. rg --type go 'GetSignBytesAdapter\('Length of output: 799
Script:
#!/bin/bash # Extract the lines of code where `GetSignBytesAdapter` is called to verify if the `signerData` parameter is being passed. rg --type go -C 2 'GetSignBytesAdapter\('Length of output: 2790
testutil/testdata/grpc_query.go (2)
- 6-6: The addition of the
test
package import fromgh.neting.cc/cosmos/gogoproto/types/any/test
is necessary for the migration to the updatedgogoproto
types. This ensures that the correct types are used in theQueryImpl
struct's methods.- 26-26: Updating type references from
Animal
totest.Animal
in theQueryImpl
struct's methods aligns with the migration to the newgogoproto
types. This change ensures that the correct types are used, maintaining the functionality and compatibility of the code.Also applies to: 54-54
store/db/rocksdb_noflag.go (4)
- 16-16: The
RocksDB
struct is now defined without any fields. This change simplifies the struct since it's used in a build context where RocksDB is not enabled. The empty struct definition is appropriate here.- 56-56: The
rocksDBIterator
struct is now defined without any fields. Similar to theRocksDB
struct, this change is appropriate for the build context where RocksDB is not enabled.- 90-90: The
rocksDBBatch
struct is now defined without any fields. This is consistent with the other struct changes in this file and is suitable for the build context.- 11-11: All functions in this file now contain a panic statement with the message "rocksdb must be built with -tags rocksdb". This change ensures that any attempt to use these functions without the appropriate build tags will result in a clear and immediate error. This is a good practice for conditional compilation scenarios.
codec/any_test.go (6)
- 6-6: The import path has been updated from
testdata
totest
for interfaces and implementations related to animals. This change aligns with the updated package structure and ensures that the correct types are used in the tests.- 19-23: The registration of interfaces and implementations has been updated to use the new
test
package. This change is necessary due to the updated import paths and ensures that the tests are using the correct types.- 30-30: The registration of implementations has been updated to use the new
test
package. This change is consistent with the other updates in this file and ensures that the tests are using the correct types.- 36-36: The variable
kitty
is now instantiated using thetest
package. This change is necessary due to the updated import paths and ensures that the tests are using the correct types.- 44-44: The variable
animal
is now declared using thetest
package. This change is consistent with the other updates in this file and ensures that the tests are using the correct types.- 56-56: The registration of implementations has been updated to use the new
test
package. This change ensures that the tests are using the correct types and is consistent with the other updates in this file.codec/amino.go (2)
- 11-11: The import path has been updated to
gogoprototypes
fromtypes
. This change reflects the migration to using the updatedgogoproto
types for handling interfaces with the Amino codec. Ensuring the correct import path is used is crucial for compatibility and functionality.- 65-77: The method calls for packing and unpacking interfaces have been updated to use the
gogoprototypes
package. This change is necessary due to the updated import paths and ensures that the Amino codec is using the correct methods for handling interfaces. It's important for maintaining compatibility and functionality with the updatedgogoproto
types.x/auth/migrations/legacytx/stdtx.go (2)
- 4-4: The import path has been updated to use
types "github.com/cosmos/gogoproto/types/any"
. This change reflects the migration to using the updatedgogoproto
types for handling interfaces. Ensuring the correct import path is used is crucial for compatibility and functionality.- 110-110: The
AsAny
method in theStdTx
struct has been updated to usetypes.UnsafePackAnyWithCache
instead ofcodectypes.UnsafePackAny
. This change is necessary due to the updated import paths and ensures that the method is using the correct function for packing theStdTx
struct into anAny
type. It's important for maintaining compatibility and functionality with the updatedgogoproto
types.codec/types/types_test.go (5)
- 9-10: The import paths have been updated to include
gogoproto/types/any
andgogoproto/types/any/test
. This change reflects the migration to using the updatedgogoproto
types for handling interfaces in tests. Ensuring the correct import paths are used is crucial for compatibility and functionality.- 18-30: The registration of interfaces and implementations has been updated to use the new
test
package. This change is necessary due to the updated import paths and ensures that the tests are using the correct types. Additionally, theNewAnyWithValue
method call has been correctly updated to reflect the new package structure.- 32-48: A new test function
TestAnyResetCache
has been added to test the cache reset functionality of theAny
type. This addition is a good practice for ensuring the correctness of cache-related behavior in theAny
type. The test is well-structured and covers the intended functionality.- 106-106: The error message in the
TestRegister
function has been updated to reflect the new package structure. This change ensures that the error message is accurate and informative, which is important for debugging and understanding test failures.- 189-192: The
UnpackInterfaces
method call has been updated to usegogoproto.ProtoJSONPacker
. This change is necessary due to the updated import paths and ensures that the method is using the correct packer for handling interfaces with JSON. It's important for maintaining compatibility and functionality with the updatedgogoproto
types.store/db/pebbledb.go (2)
- 10-12: The import statements have been reorganized, moving
pebble
andcast
imports up. This reorganization improves the readability of the import section by grouping similar imports together. It's a minor change but contributes to the overall cleanliness of the code.- 10-12: The
NewPebbleDB
function has been modified to internally callNewPebbleDBWithOpts
withnil
as the options parameter. This change simplifies the code by reducing duplication and leveraging the existing functionality ofNewPebbleDBWithOpts
. It's a good practice to avoid code duplication where possible.baseapp/grpcrouter_test.go (1)
- 171-171: The function call to register the query server has been updated to use
testdata_pulsar.RegisterQueryServer
instead oftestdata.RegisterQueryServer
. This change reflects the migration to using the updated package path for registering the query server. Ensuring the correct function is used is crucial for the functionality of the tests.x/evidence/types/genesis.pb.go (4)
- 9-9: The import path for
Any
has been correctly updated toany.Any
fromgh.neting.cc/cosmos/gogoproto/types/any
. This change aligns with the PR's objective to migrate to the newergogoproto
types.- 29-29: The
GenesisState
struct'sEvidence
field type has been updated to[]*any.Any
. This change is necessary for compatibility with the updatedgogoproto
version and follows the migration fromtypes.Any
toany.Any
. Ensure that all references to this field across the codebase are updated accordingly to avoid type mismatches.- 65-65: The
GetEvidence
method correctly returns a slice of pointers toany.Any
, aligning with the updated import and type usage. This consistency is crucial for maintaining the integrity of the codebase following the dependency update.- 223-223: In the
Unmarshal
method, theEvidence
slice is correctly appended with instances ofany.Any
. This change is part of the migration to the newergogoproto
types and is implemented correctly. However, ensure that the unmarshalling process is thoroughly tested with the new type to prevent runtime issues.crypto/keys/multisig/keys.pb.go (1)
- 33-33: The migration from
types.Any
toany.Any
in thePubKeys
field of theLegacyAminoPubKey
struct aligns with the PR's objectives to update togogoproto v1.4.12
and migrate togogoproto/types/any
. Ensure to verify the impact of this change on serialization and deserialization processes, especially in multisig functionalities.x/auth/types/genesis.pb.go (1)
- 33-33: The migration from
types.Any
toany.Any
in theAccounts
field of theGenesisState
struct is in line with the PR's objectives. Ensure to verify the impact of this change on the genesis process, particularly regarding compatibility with existing genesis files.codec/types/interface_registry.go (3)
- 31-53: Redefinition of the
UnpackInterfacesMessage
interface and introduction of theUnpackInterfaces
function are significant changes that enhance how types packed withinAny
are unpacked. Ensure thorough testing, especially in scenarios involving nestedAny
types and recursive unpacking, to prevent regressions in functionality.- 287-287: The handling of cached values in the
UnpackAny
method is a noteworthy improvement. It's important to ensure that the cached value logic correctly handles type compatibility and does not lead to incorrect type assignments, especially in concurrent scenarios.- 324-329: The creation of new
Any
instances with cached values in theUnpackAny
method introduces a change in howAny
values are managed. Ensure that this does not lead to inconsistencies inAny
handling across different parts of the application, particularly in serialization and deserialization processes.x/evidence/types/tx.pb.go (3)
- 16-16: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, which is concise and avoids confusion with the standardany
interface introduced in Go 1.18. This change aligns with the PR objectives and is a good practice for clarity.- 42-42: The replacement of
types.Any
withany.Any
for theEvidence
field in theMsgSubmitEvidence
struct is correctly implemented. This change is consistent with the PR's objective to migrate to the newergogoproto/types/any
package. It's important to ensure that all references and usages ofMsgSubmitEvidence
throughout the codebase are updated to reflect this change.Verification successful
Given the extensive presence of
types.Any
across various modules and files in the codebase, it's clear that its usage is widespread and serves multiple purposes beyond the scope of theMsgSubmitEvidence
struct. The specific change fromtypes.Any
toany.Any
in theMsgSubmitEvidence
struct is a targeted update within the evidence module. Each module listed in the script output likely utilizestypes.Any
for its distinct functionalities, such as governance proposals, account information, or message storage, which are unrelated to the evidence submission process.Therefore, the presence of
types.Any
references in the codebase does not inherently indicate an issue with the migration toany.Any
for theMsgSubmitEvidence
struct. It's essential, however, to ensure that all references directly related to evidence submission are correctly updated to reflect this change. The specific mention of files within thex/evidence
module, such asx/evidence/types/msgs.go
,x/evidence/types/genesis.go
, andx/evidence/keeper/grpc_query.go
, should be scrutinized to confirm they align with the migration objectives.* 478-478: The instantiation of `m.Evidence` as `&any.Any{}` during unmarshaling is correctly done. This ensures that the `Evidence` field is properly initialized with the new `any.Any` type before unmarshaling the data into it. This change is necessary due to the type migration and is correctly implemented.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to the old `types.Any` in Go files that might need updating. rg --type go 'types\.Any' --files-with-matchesLength of output: 2501
x/nft/nft.pb.go (7)
- 9-9: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly updated to reflect the new dependency version and the migration fromtypes.Any
toany.Any
. This change is consistent with the PR objectives.- 41-41: The
Data
field in theClass
struct has been correctly updated to useany.Any
instead oftypes.Any
. This change aligns with the PR's goal of migrating to the newergogoproto/types/any
package.- 119-119: The
GetData
method for theClass
struct has been updated to return a pointer toany.Any
. This change is consistent with the update to theData
field type and follows best practices for accessor methods in Go.- 137-137: The
Data
field in theNFT
struct has been correctly updated to useany.Any
instead oftypes.Any
. This change is in line with the PR's objectives and ensures compatibility with the updatedgogoproto
dependency.- 201-201: The
GetData
method for theNFT
struct has been updated to return a pointer toany.Any
, consistent with the change to theData
field type. This update follows Go best practices for accessor methods.- 713-713: The instantiation of
m.Data
within theUnmarshal
method for theClass
struct correctly usesany.Any
. This ensures that the unmarshaling process is compatible with the updated field type.- 927-927: Similarly, the instantiation of
m.Data
within theUnmarshal
method for theNFT
struct correctly usesany.Any
. This change is necessary for the unmarshaling process to work with the updatedData
field type.x/authz/authz.pb.go (3)
- 13-13: The import alias for
any "github.com/cosmos/gogoproto/types/any"
is correctly updated to reflect the new package path following the migration fromtypes.Any
toany.Any
. This change is consistent with the PR's objective to update thegogoproto
dependency and migrate to the newerany.Any
type.- 76-76: The
Authorization
field in theGrant
struct has been correctly updated to useany.Any
instead oftypes.Any
. This change aligns with the PR's objective of migrating to the newerany.Any
type and ensures compatibility with the updatedgogoproto
dependency.- 121-121: Similarly, the
Authorization
field in theGrantAuthorization
struct has been updated to useany.Any
, consistent with the migration strategy outlined in the PR. This change is necessary for maintaining compatibility with the latestgogoproto
standards and features.x/evidence/types/query.pb.go (5)
- 12-12: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly updated toany
, aligning with the migration fromtypes.Any
togogoproto/types/any.Any
.- 95-95: The type of
Evidence
inQueryEvidenceResponse
struct has been correctly updated to*any.Any
fromtypes.Any
. This change is consistent with the PR's objective of migrating to the newergogoproto/types/any
package.- 131-131: The getter method
GetEvidence
forQueryEvidenceResponse
now correctly returns a pointer toany.Any
, reflecting the updated type in the struct. This change is necessary for consistency with the updated field type.- 189-189: In
QueryAllEvidenceResponse
, the type of theEvidence
slice has been correctly updated to[]*any.Any
from[]*types.Any
. This change aligns with the migration togogoproto/types/any
and affects the handling of evidence data in a list context.- 227-227: The getter method
GetEvidence
forQueryAllEvidenceResponse
now correctly returns a slice of pointers toany.Any
, reflecting the updated type in the struct. This change ensures consistency with the updated field type in a list context.crypto/keyring/record.pb.go (3)
- 10-10: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, aligning with Go best practices for readability and avoiding namespace conflicts.- 33-33: The
PubKey
field in theRecord
struct has been correctly updated to useany.Any
from thegogoproto/types
package. This change is consistent with the PR's objective to migrate fromtypes.Any
togogoproto/types/any
.- 149-149: Similarly, the
PrivKey
field in theRecord_Local
struct has been updated to useany.Any
. This change aligns with the migration strategy and ensures consistency across the codebase.x/auth/types/auth.pb.go (4)
- 7-12: The import statements are correctly organized and include necessary packages for the protobuf definitions. Unused imports are appropriately suppressed using the blank identifier to avoid compilation errors.
- 33-36: The struct definitions, including
BaseAccount
,ModuleAccount
,ModuleCredential
, andParams
, are correctly defined with appropriate protobuf tags. Notably, thePubKey
field in theBaseAccount
struct has been updated to useany.Any
fromgh.neting.cc/cosmos/gogoproto/types/any
, aligning with the migration objectives.- 726-732: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [37-729]
The generated methods for marshaling, unmarshaling, size calculation, and other operations are correctly implemented following the protobuf specification. These methods include necessary error handling and optimizations for efficient data processing.
- 6-15: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-729]
The overall structure and formatting of the file are well-organized and adhere to Go conventions. The separation between imports, struct definitions, and generated methods is clear, and the use of comments enhances readability.
testutil/testdata/query.pb.go (4)
- 11-11: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly updated to reflect the new dependency path. This change is consistent with the PR's objective of migrating to the newergogoproto
version.- 208-208: The
TestAnyRequest
struct has been updated to use*any.Any
for theAnyAnimal
field, aligning with the migration fromtypes.Any
togogoproto/types/any
. This change is crucial for ensuring compatibility with the updatedgogoproto
dependency.- 244-244: The
GetAnyAnimal
method correctly returns a pointer toany.Any
, which is consistent with the updated field type in theTestAnyRequest
struct. This ensures that the method's return type is aligned with the field's type.- 1157-1157: The unmarshalling logic for
AnyAnimal
within theTestAnyRequest
struct has been correctly updated to instantiate aany.Any
type. This change is necessary for the unmarshalling process to work with the updatedgogoproto/types/any
dependency.x/upgrade/types/upgrade.pb.go (3)
- 13-13: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, aligning with Go best practices for readability and avoiding namespace conflicts.- 55-55: The
UpgradedClientState
field in thePlan
struct has been updated to useany.Any
instead oftypes.Any
. This change is consistent with the PR's objective to migrate to the newergogoproto/types/any
. However, it's marked as deprecated, which is appropriate if the intention is to discourage its use in favor of a new approach or structure. Ensure that this deprecation is communicated clearly in the project's documentation and migration guides.- 847-847: The instantiation of
UpgradedClientState
as&any.Any{}
during unmarshalling is correct and ensures that the field is properly initialized before attempting to unmarshal data into it. This is a good practice to prevent nil pointer dereferences.x/feegrant/feegrant.pb.go (4)
- 15-15: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, aligning with Go best practices for readability and avoiding unnecessary verbosity in the code.- 184-184: The replacement of
types1.Any
withany.Any
for theAllowance
field in theAllowedMsgAllowance
struct is correctly implemented. This change aligns with the PR's objective to migrate to the newergogoproto/types/any
package.- 229-229: Similarly, the replacement of
types1.Any
withany.Any
for theAllowance
field in theGrant
struct is correctly implemented. This ensures consistency across the codebase and aligns with the updatedgogoproto
dependency.- 279-279: The method
GetAllowance
in theGrant
struct correctly returns a pointer to anany.Any
type. This method facilitates access to theAllowance
field, adhering to Go best practices for encapsulation and type safety.x/feegrant/tx.pb.go (3)
- 14-14: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, which is concise and avoids naming conflicts. This change aligns with the migration fromtypes.Any
toany.Any
.- 42-42: The
Allowance
field in theMsgGrantAllowance
struct has been correctly updated to useany.Any
from thegogoproto/types
package. This change is necessary for the migration and ensures compatibility with the updatedgogoproto
version.- 92-92: The
GetAllowance
method correctly returns a pointer to anany.Any
type, ensuring that the method's return type is consistent with the updatedAllowance
field type.types/tx/signing/signing.pb.go (3)
- 8-10: The addition of the import
any "github.com/cosmos/gogoproto/types/any"
correctly aligns with the PR's objective to migrate fromtypes.Any
toany.Any
. This change is necessary for compatibility with the updatedgogoproto
types.- 155-155: The update of the
PublicKey
field type toany.Any
fromtypes.Any
in theSignatureDescriptor
struct correctly implements the necessary migration to the updatedgogoproto
types. This change is aligned with the PR objectives.- 364-364: The update of the
Bitarray
field type totypes.CompactBitArray
fromtypes1.CompactBitArray
in theSignatureDescriptor_Data_Multi
struct correctly standardizes the usage of types within the codebase. This change improves readability and maintainability.testutil/testdata/testdata.pb.go (7)
- 10-10: The import alias for
github.com/cosmos/gogoproto/types/any
is correctly defined asany
, aligning with the PR's objective to migrate fromtypes.Any
togogoproto's
any.Any
.- 184-184: The replacement of
types.Any
withany.Any
in theHasAnimal
struct is correctly implemented, ensuring compatibility with the updatedgogoproto
types.- 221-221: The method
GetAnimal
in theHasAnimal
struct correctly returns a pointer toany.Any
, aligning with the migration togogoproto's
any.Any
.- 236-236: The replacement of
types.Any
withany.Any
in theHasHasAnimal
struct is correctly implemented, ensuring compatibility with the updatedgogoproto
types.- 272-272: The method
GetHasAnimal
in theHasHasAnimal
struct correctly returns a pointer toany.Any
, aligning with the migration togogoproto's
any.Any
.- 280-280: The replacement of
types.Any
withany.Any
in theHasHasHasAnimal
struct is correctly implemented, ensuring compatibility with the updatedgogoproto
types.- 316-316: The method
GetHasHasAnimal
in theHasHasHasAnimal
struct correctly returns a pointer toany.Any
, aligning with the migration togogoproto's
any.Any
.x/authz/tx.pb.go (2)
- 15-15: The import statement for
any "github.com/cosmos/gogoproto/types/any"
correctly replaces the deprecatedtypes.Any
withany.Any
. This change aligns with the PR's objective to migrate to the newergogoproto/types/any
.- 121-121: The
Msgs
field in theMsgExec
struct has been updated to useany.Any
from thegogoproto/types
package instead of the deprecatedtypes.Any
. This change is consistent with the PR's goal of updating togogoproto
versionv1.4.12
and migrating to the newerany.Any
type.x/gov/types/v1beta1/tx.pb.go (5)
- 11-11: Renaming the package alias from
types1
totypes
improves readability and consistency. Good change.- 17-17: Updating the import path to use
any
fromgogoproto/types
instead ofcodec/types
aligns with the migration to the newer version ofgogoproto
. This change is necessary for compatibility with the updated dependency.- 41-41: The change from
types.Any
toany.Any
for theContent
field inMsgSubmitProposal
is consistent with the migration to the newergogoproto
types. This update is crucial for ensuring that the serialization and deserialization processes work with the updatedgogoproto
version.- 1163-1163: The use of
types.Coin
in theInitialDeposit
field remains unchanged. It's important to verify that thetypes.Coin
definition is compatible with the updatedgogoproto
version and does not require migration to a new type. Iftypes.Coin
is defined in a file that also underwent changes due to thegogoproto
update, ensure those changes are correctly applied.- 1754-1754: Similar to the previous comment, ensure that the
types.Coin
definition used in theAmount
field ofMsgDeposit
is compatible with the updatedgogoproto
version. This verification is crucial for maintaining the integrity of the serialization and deserialization processes.x/accounts/v1/tx.pb.go (11)
- 16-16: The import
any "github.com/cosmos/gogoproto/types/any"
replaces the deprecatedtypes.Any
. This change aligns with the PR's objective to migrate to the newergogoproto/types/any
. Ensure that all references totypes.Any
are updated accordingly throughout the codebase.- 43-43: The replacement of
types.Any
withany.Any
for theMessage
field inMsgInit
struct is correctly implemented according to the PR's objectives. This change is crucial for compatibility with the updatedgogoproto
version.- 96-96: The getter method
GetMessage
for theMsgInit
struct correctly returns a pointer toany.Any
. This change is consistent with the migration togogoproto/types/any
.- 115-115: The replacement of
types.Any
withany.Any
for theResponse
field inMsgInitResponse
struct is correctly implemented. This aligns with the PR's goal of updating to the newergogoproto/types/any
.- 158-158: The getter method
GetResponse
for theMsgInitResponse
struct correctly returns a pointer toany.Any
, aligning with the migration togogoproto/types/any
.- 172-172: The replacement of
types.Any
withany.Any
for theMessage
field inMsgExecute
struct is correctly implemented, ensuring compatibility with the updatedgogoproto
version.- 225-225: The getter method
GetMessage
for theMsgExecute
struct correctly returns a pointer toany.Any
, consistent with the migration togogoproto/types/any
.- 242-242: The replacement of
types.Any
withany.Any
for theResponse
field inMsgExecuteResponse
struct is correctly implemented, aligning with the PR's objectives.- 278-278: The getter method
GetResponse
for theMsgExecuteResponse
struct correctly returns a pointer toany.Any
, consistent with the migration togogoproto/types/any
.- 343-343: The replacement of
types.Any
withany.Any
for theExecResponses
field inBundledTxResponse
struct is correctly implemented. This change is crucial for compatibility with the updatedgogoproto
version.- 380-380: The getter method
GetExecResponses
for theBundledTxResponse
struct correctly returns a pointer toany.Any
, aligning with the migration togogoproto/types/any
.x/accounts/v1/query.pb.go (1)
- 36-36: The migration from
types.Any
to*any.Any
in struct fields is correctly implemented according to the PR objectives. Ensure that this change does not affect the serialization or deserialization of existing data, potentially requiring data migration or compatibility layers.Also applies to: 79-79, 89-89, 125-125
x/accounts/defaults/lockup/types/tx.pb.go (4)
- 16-16: The import alias
any
forgh.neting.cc/cosmos/gogoproto/types/any
is correctly introduced to replacetypes1.Any
withany.Any
. This change aligns with the PR's objective to migrate to the newergogoproto/types/any
.- 363-363: The replacement of
types1.Any
withany.Any
in theMsgExecuteMessagesResponse
struct is correctly implemented. This change is consistent with the migration strategy outlined in the PR objectives.- 399-399: The method
GetResponses
correctly returns a slice of*any.Any
, aligning with the updated import and type usage. This ensures that the method's return type is consistent with the updatedMsgExecuteMessagesResponse
struct.- 6-19: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-2105]
Ensure that all other message types and methods in this file are unaffected by the
types1.Any
toany.Any
migration and that they continue to function as expected. This includes serialization, deserialization, and any method logic that may indirectly interact with the changed types.x/gov/types/v1beta1/gov.pb.go (2)
- 16-16: The import alias for
github.com/cosmos/gogoproto/types/any
has been correctly updated toany
from presumablytypes1
to reflect the new dependency version and usage. This change aligns with the PR objectives and improves readability by using a more intuitive alias.- 260-260: The replacement of
types1.Any
withany.Any
in theContent
field of theProposal
struct is correctly implemented. This change is consistent with the PR's objective to migrate from the deprecatedcodec/types/any
togogoproto/types/any
, ensuring compatibility with the latestgogoproto
features and standards.types/abci.pb.go (7)
- 8-12: The import aliases
types
andtypes1
are used to resolve package name conflicts. While this is automatically generated and functionally correct, it could potentially lead to confusion when reading the code. Consider renaming these imports in the protobuf definitions for clarity, if possible.- 56-56: The use of
any.Any
from thegogoproto/types/any
package for theTx
field inTxResponse
struct is noted. Ensure that all necessary migrations fromtypes.Any
toany.Any
are completed across the codebase to maintain consistency and compatibility.- 67-67: The
Events
field in theTxResponse
struct usestypes.Event
, which seems to be imported with an alias due to package name conflicts. It's important to ensure that the correctEvent
type is being used here, especially after the migration toany.Any
. Double-check the protobuf definitions to confirm that the correct types are being referenced.Verification successful
The verification process has confirmed that the
Event
type used in theTxResponse
struct is indeed specified astendermint.abci.Event
in the protobuf definition, aligning with the expectations mentioned in the review comment. This ensures that the correctEvent
type is being referenced, especially after the migration toany.Any
.* 335-335: The `Events` field in the `Result` struct also uses `types.Event`. Similar to the previous comment, verify that the migration to `any.Any` and the usage of package aliases do not affect the correct usage of the `Event` type across the codebase. * 339-339: The `MsgResponses` field in the `Result` struct uses `any.Any`. This is part of the migration to the newer `any.Any` type. Ensure that all message response types are correctly migrated and compatible with this change.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that the correct Event type is being used in protobuf definitions. rg --type proto 'Event'Length of output: 53
Script:
#!/bin/bash # Adjusting the search to explicitly target .proto files rg 'Event' --glob '*.proto'Length of output: 5613
Verification successful
The verification process has confirmed that all instances of
MsgResponses
across the codebase have been correctly migrated to useany.Any
oranypb.Any
. This indicates a successful migration and compatibility with the change. No issues related to the migration were found in the provided context.* 483-483: Similar to the previous comment, the `MsgResponses` field in the `TxMsgData` struct uses `any.Any`. Verify that all necessary migrations and compatibility checks are performed for message response types. * 636-636: The `Blocks` field in the `SearchBlocksResult` struct uses `types1.Block`, indicating an import alias due to package name conflicts. Ensure that the correct `Block` type is being used and consider renaming imports in the protobuf definitions for clarity.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all message response types are correctly migrated to use any.Any. rg --type go 'MsgResponses'Length of output: 6727
x/group/types.pb.go (3)
- 13-13: The import
any "github.com/cosmos/gogoproto/types/any"
has been added to support the migration fromtypes.Any
toany.Any
. Ensure that all references totypes.Any
have been updated to useany.Any
accordingly.- 653-653: The
DecisionPolicy
field in theGroupPolicyInfo
struct has been correctly updated to useany.Any
fromgh.neting.cc/cosmos/gogoproto/types/any
. This change aligns with the migration goal.- 732-732: The
Messages
field in theProposal
struct has been correctly updated to useany.Any
fromgh.neting.cc/cosmos/gogoproto/types/any
. This change is consistent with the migration fromtypes.Any
toany.Any
.x/staking/types/tx.pb.go (8)
- 11-18: The import aliases for packages are not consistent with the Uber Go Style Guide, which recommends avoiding aliasing except in cases of conflict.
Consider removing unnecessary aliases for better readability and conformity to Go best practices.
- 49-52: The use of
omitempty
JSON tag option for non-pointer fields of basic types or structs might lead to unexpected behavior when marshaling zero values. It's generally safe for pointer fields or slices where a nil value is meaningful.Evaluate if the
omitempty
option is necessary for these fields, especially forDelegatorAddress
andValidatorAddress
which are of typestring
, andValue
which is a struct. Removingomitempty
can ensure that zero values (e.g., empty strings) are correctly represented in the JSON output.
- 210-212: Similar to the previous comment, reconsider the use of
omitempty
for fieldsDelegatorAddress
,ValidatorAddress
, andAmount
inMsgDelegate
. These fields are crucial for the message, and omitting them when empty might not be desirable.- 288-291: For
MsgBeginRedelegate
, the same advice regardingomitempty
applies. Ensure that the decision to useomitempty
aligns with the intended behavior for zero values of these fields.- 375-377: The
omitempty
JSON tag option is used forDelegatorAddress
,ValidatorAddress
, andAmount
inMsgUndelegate
. Consider the implications of omitting empty values in the JSON representation and adjust accordingly.- 419-419: The field
Amount
inMsgUndelegateResponse
uses theomitempty
JSON tag option. Given that this field represents a significant part of the response, carefully evaluate the need for omitting zero values.- 476-476: For
MsgCancelUnbondingDelegation
, theAmount
field also usesomitempty
. As this field is essential for understanding the operation being canceled, consider if omitting it when empty is appropriate.- 656-657: In
MsgRotateConsPubKey
, theomitempty
JSON tag option is used forValidatorAddress
andNewPubkey
. Given the critical nature of these fields for the message's purpose, ensure that omitting them when empty is the intended behavior.x/auth/types/query.pb.go (9)
- 14-14: The import alias
any
forgh.neting.cc/cosmos/gogoproto/types/any
is correctly updated to reflect the migration fromtypes.Any
togogoproto's
any.Any
. This change aligns with the PR's objective of updating thegogoproto
dependency and migrating to the newerany.Any
type.- 88-88: The replacement of
types.Any
withany.Any
in theQueryAccountsResponse
struct is correctly implemented. This change is part of the migration to use the updatedgogoproto
types and is consistent with the PR's objectives.- 126-126: The getter method
GetAccounts
inQueryAccountsResponse
now correctly returns a slice of*any.Any
. This adjustment is necessary due to the change in theAccounts
field type and ensures compatibility with the updatedgogoproto
types.- 182-182: The replacement of
types.Any
withany.Any
in theQueryAccountResponse
struct is correctly implemented. This change is part of the migration to use the updatedgogoproto
types and is consistent with the PR's objectives.- 218-218: The getter method
GetAccount
inQueryAccountResponse
now correctly returns a*any.Any
. This adjustment is necessary due to the change in theAccount
field type and ensures compatibility with the updatedgogoproto
types.- 351-351: The replacement of
types.Any
withany.Any
in theQueryModuleAccountsResponse
struct is correctly implemented. This change is part of the migration to use the updatedgogoproto
types and is consistent with the PR's objectives.- 387-387: The getter method
GetAccounts
inQueryModuleAccountsResponse
now correctly returns a slice of*any.Any
. This adjustment is necessary due to the change in theAccounts
field type and ensures compatibility with the updatedgogoproto
types.- 441-441: The replacement of
types.Any
withany.Any
in theQueryModuleAccountByNameResponse
struct is correctly implemented. This change is part of the migration to use the updatedgogoproto
types and is consistent with the PR's objectives.- 477-477: The getter method
GetAccount
inQueryModuleAccountByNameResponse
now correctly returns a*any.Any
. This adjustment is necessary due to the change in theAccount
field type and ensures compatibility with the updatedgogoproto
types.x/gov/types/v1/tx.pb.go (5)
- 18-18: The import alias
any
is introduced for"github.com/cosmos/gogoproto/types/any"
. Consider using a more descriptive alias to avoid confusion with"google.golang.org/protobuf/types/known/anypb"
.- 45-45: The field
Messages
inMsgSubmitProposal
struct is updated to useany.Any
instead oftypes.Any
. Ensure that all serialization and deserialization logic, as well as any usage of this field across the codebase, is updated accordingly to handle the new type.- 214-214: The field
Content
inMsgExecLegacyContent
struct is updated to useany.Any
instead oftypes.Any
. Similar to the previous comment, ensure that all related logic is updated to work withany.Any
.- 530-530: The
Amount
field inMsgDeposit
struct remains unchanged, but it's important to verify that the serialization and deserialization logic fortypes.Coin
is compatible with the updatedgogoproto
version.- 1102-1102: The
Msg
field inMsgSudoExec
struct is updated to useany.Any
instead oftypes.Any
. Ensure compatibility and correct handling of this field across the codebase.client/grpc/cmtservice/query.pb.go (5)
- 3432-3432: The usage of
any.Any
from thegogoproto
package for thePubKey
field in theValidator
struct is consistent with the migration fromtypes.Any
togogoproto's
any.Any
as mentioned in the PR summary. This change is crucial for compatibility with the updatedgogoproto
types.- 3625-3625: The usage of
types.BlockID
for theBlockId
field in theGetBlockByHeightResponse
struct aligns with the cosmos-sdk's approach to handling blockchain data structures. This ensures that the block ID is correctly represented and utilized within the cosmos-sdk ecosystem.- 3661-3661: The usage of
types.Block
for theBlock
field in theGetBlockByHeightResponse
struct is appropriate, as it ensures that the block data is correctly represented according to the cosmos-sdk's data structures. This is essential for the correct serialization and deserialization of block data.- 3833-3833: The usage of
types.BlockID
for theBlockId
field in theGetLatestBlockResponse
struct is consistent and correct, ensuring that the block ID is represented according to the cosmos-sdk's data structures. This consistency is crucial for the integrity of block data within the ecosystem.- 3869-3869: The usage of
types.Block
for theBlock
field in theGetLatestBlockResponse
struct is correct, aligning with the cosmos-sdk's data structures for representing block data. This ensures that block data is serialized and deserialized correctly within the ecosystem.x/gov/types/v1/gov.pb.go (2)
- 14-14: The import of the
any
package has been updated to usegh.neting.cc/cosmos/gogoproto/types/any
instead oftypes1.Any
. This change aligns with the PR's objective to migrate from the deprecatedcodec/types/any
to the newergogoproto/types/any
.- 310-310: The
Messages
field in theProposal
struct has been correctly updated to use[]*any.Any
instead of[]*types1.Any
, following the migration to the newgogoproto/types/any
package.x/group/tx.pb.go (9)
- 15-15: The import alias for
github.com/cosmos/gogoproto/types/any
asany
is clear and follows good Go practices for readability and avoiding namespace conflicts. This change aligns with the PR's objective of migrating to the newergogoproto/types/any
.- 490-490: The change from
types.Any
to*any.Any
for theDecisionPolicy
field inMsgCreateGroupPolicy
is correctly implemented. It's important to ensure that all related serialization, deserialization, and usage of this field are updated accordingly to handle the new type.Verification successful
Given the findings, it appears that the change from
types.Any
to*any.Any
for theDecisionPolicy
field has been reflected in multiple places within the codebase, including bothtx.pb.go
andtypes.pb.go
files. The initialization ofDecisionPolicy
with&any.Any{}
in several locations suggests that updates have been made to accommodate the new pointer type. However, to conclusively verify that all related serialization and deserialization logic, as well as usage of this field, have been correctly updated, it would be beneficial to examine the context around these occurrences more closely.
The provided context from the script output confirms that the
DecisionPolicy
field's change to*any.Any
has been integrated across various parts of the codebase, including in structures and methods related to serialization and deserialization. Specifically, the output shows:
- The
DecisionPolicy
field is declared with the new type*any.Any
in different message structures withintx.pb.go
andtypes.pb.go
.- There are instances where
DecisionPolicy
is being initialized with&any.Any{}
, indicating that the code has been updated to handle the new pointer type correctly.- The
Unmarshal
method is called onDecisionPolicy
, which is part of the deserialization process, further indicating that the necessary updates to handle the new type have been made.These findings verify that the change from
types.Any
to*any.Any
for theDecisionPolicy
field inMsgCreateGroupPolicy
and related structures has been correctly implemented, and the related serialization, deserialization, and usage of this field have been updated accordingly.* 687-687: Similar to the previous comment, the update of the `DecisionPolicy` field in `MsgCreateGroupWithPolicy` to use `*any.Any` is correctly done. Ensure consistency in handling this type across the codebase.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that serialization and deserialization logic for DecisionPolicy has been updated. rg 'DecisionPolicy.*any.Any' --type goLength of output: 842
Script:
#!/bin/bash # Extract context around occurrences of DecisionPolicy being updated to *any.Any rg 'DecisionPolicy.*any.Any' --type go -C 5Length of output: 5813
Verification successful
The review comment regarding the update of the
DecisionPolicy
field inMsgCreateGroupWithPolicy
to use*any.Any
and ensuring consistency in handling this type across the codebase is supported by the evidence from the codebase. The search results confirm thatDecisionPolicy *any.Any
is consistently used and initialized across thex/group
package, indicating a standard practice in handling this type.* 785-785: Updating the `DecisionPolicy` field in `MsgUpdateGroupPolicyDecisionPolicy` to `*any.Any` is in line with the migration goals. Consistency in handling this type change is crucial for maintaining functionality.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Confirm consistent handling of DecisionPolicy across the codebase. rg 'DecisionPolicy.*any.Any' --type goLength of output: 842
Verification successful
The script output indicates that the
DecisionPolicy
field has been updated to type*any.Any
in multiple instances within thex/group
directory, suggesting a consistent migration effort. However, the script focused on finding instances ofDecisionPolicy
with type*any.Any
and did not explicitly verify the absence ofDecisionPolicy
fields of other types. Based on the information available, it appears that the update is consistent with the migration goals, but complete verification of consistency across the entire codebase would require a more exhaustive search. Given the evidence, the review comment seems to be in line with the observed codebase changes.* 973-973: The migration of the `Messages` field in proposals to a slice of `*any.Any` is a significant change. This affects how messages within proposals are serialized, deserialized, and processed. It's crucial to review related logic to ensure compatibility. * 4616-4616: The initialization of `DecisionPolicy` to `&any.Any{}` during unmarshalling is correct. This ensures that the field is ready for use even if not explicitly set in the incoming data. Review related logic to ensure seamless integration. * 5130-5130: The initialization of `DecisionPolicy` to `&any.Any{}` in another unmarshalling context is consistent with the previous comment. This consistency is key to ensuring reliable data handling. * 5381-5381: Again, initializing `DecisionPolicy` to `&any.Any{}` during unmarshalling is correctly applied, maintaining consistency across different parts of the codebase. * 5808-5808: Appending a new `&any.Any{}` to `Messages` and then unmarshalling into it is a correct approach for handling dynamic message types in proposals. Ensure that all logic processing these messages accounts for the new type.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check for consistent updates to DecisionPolicy handling. rg 'DecisionPolicy.*any.Any' --type goLength of output: 842
x/staking/types/staking.pb.go (13)
- 11-21: The import alias changes from
types2
,types
, andtypes1
to a more consistent naming convention are good for clarity. However, ensure that these changes are consistently applied across the entire codebase to avoid confusion or errors due to the renaming.- 419-419: Changing the
ConsensusPubkey
field type fromtypes1.Any
toany.Any
aligns with the migration to the updatedgogoproto
types. This is a crucial update for compatibility with the latestgogoproto
features. Ensure that all related serialization and deserialization logic is updated accordingly.- 1003-1003: The update of
KeyRotationFee
field type totypes1.Coin
is consistent with the renaming strategy. Ensure that thetypes1.Coin
type is correctly defined and that all references toKeyRotationFee
are updated to reflect this change.- 1074-1078: The addition of the
GetKeyRotationFee
method is a good practice for encapsulating the access to struct fields. Ensure that this method is used consistently whereverKeyRotationFee
needs to be accessed.- 1085-1085: The
Balance
field inDelegationResponse
being updated totypes1.Coin
is consistent with the changes made elsewhere in the code. This ensures type consistency across the codebase.- 1128-1132: The
GetBalance
method addition forDelegationResponse
is consistent with best practices for data encapsulation. Ensure that this method is utilized whereverBalance
needs to be accessed.- 1281-1281: The update in
ValidatorUpdates
to usetypes2.ValidatorUpdate
for theUpdates
field is part of the renaming strategy. Verify thattypes2.ValidatorUpdate
is correctly defined and that all instances ofValidatorUpdates
are updated accordingly.- 1317-1317: The
GetUpdates
method inValidatorUpdates
is a good addition for encapsulating the access to theUpdates
field. Ensure consistency in using this method across the codebase.- 1329-1335: The changes in
ConsPubKeyRotationHistory
, including the update ofOldConsPubkey
andNewConsPubkey
toany.Any
andFee
totypes1.Coin
, are aligned with the migration to updatedgogoproto
types and renaming strategy. Ensure that all related logic is updated to reflect these changes.- 5174-5174: Initializing
ConsensusPubkey
with&any.Any{}
before unmarshalling is a necessary change due to the type update. Ensure that error handling and unmarshalling logic are correctly implemented to handle potential issues.- 7722-7722: Appending a new
types2.ValidatorUpdate
tom.Updates
before unmarshalling is consistent with the changes made toValidatorUpdates
. Ensure that the unmarshalling logic is correctly implemented and tested.- 7841-7841: Initializing
OldConsPubkey
with&any.Any{}
before unmarshalling is necessary due to the type update. Verify that the unmarshalling logic is correctly implemented and tested for potential issues.- 7877-7877: Initializing
NewConsPubkey
with&any.Any{}
before unmarshalling is consistent with the type update. Ensure that the unmarshalling logic is correctly implemented and tested for potential issues.testutil/testdata/unknonwnproto.pb.go (8)
- 12-12: The import alias for
github.com/cosmos/gogoproto/types/any
asany
is correctly updated to reflect the migration fromtypes.Any
toany.Any
. This change is consistent with the PR's objective of updating togogoproto
versionv1.4.12
.- 138-138: The replacement of
types.Any
withany.Any
for theMiscellaneous
field in theCustomer2
struct is correctly implemented. This change aligns with the PR's goal of migrating to the newergogoproto/types/any
.- 216-216: The method
GetMiscellaneous
correctly returns a pointer toany.Any
, reflecting the updated type for theMiscellaneous
field in theCustomer2
struct. This change is consistent with the migration togogoproto/types/any
.- 856-856: The addition of the
G
field of type*any.Any
in various structs likeTestVersion1
,TestVersion2
,TestVersion3
, etc., is consistent with the PR's objective. Ensure that all references and usages of these structs are updated accordingly to handle the new field type.- 968-968: The method
GetG
correctly returns a pointer toany.Any
for theTestVersion1
struct. This change is consistent across various versions and types, reflecting the migration togogoproto/types/any
.- 6809-6811: The unmarshalling logic for the
Miscellaneous
field in various structs has been correctly updated to instantiate anany.Any
type before unmarshalling. This change is necessary due to the migration fromtypes.Any
toany.Any
.- 12546-12552: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [12549-12553]
The logic for appending and unmarshalling
*any.Any
types to theMessages
slice in theTestUpdatedTxBody
struct is correctly implemented. This change supports the migration togogoproto/types/any
and ensures that the serialization and deserialization processes are aligned with the updated dependency.
- 12716-12722: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [12719-12723]
Similarly, the logic for appending and unmarshalling
*any.Any
types to theNonCriticalExtensionOptions
slice in theTestUpdatedTxBody
struct is correctly implemented. This ensures compatibility with the updatedgogoproto
types and maintains the integrity of the serialization and deserialization processes.
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | ||
types1 "github.com/cosmos/cosmos-sdk/types" | ||
types "github.com/cosmos/cosmos-sdk/types" |
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.
The import alias types
is redeclared. This is redundant and can be removed to clean up the code.
- types "github.com/cosmos/cosmos-sdk/types"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
types "github.com/cosmos/cosmos-sdk/types" |
types "github.com/cosmos/cosmos-sdk/crypto/types" | ||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | ||
types2 "github.com/cosmos/cosmos-sdk/types" | ||
types1 "github.com/cosmos/cosmos-sdk/types" | ||
_ "github.com/cosmos/cosmos-sdk/types/tx/amino" | ||
signing "github.com/cosmos/cosmos-sdk/types/tx/signing" | ||
_ "github.com/cosmos/gogoproto/gogoproto" | ||
proto "github.com/cosmos/gogoproto/proto" | ||
any "github.com/cosmos/gogoproto/types/any" |
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.
The import alias types1
for "github.com/cosmos/cosmos-sdk/types"
on line 11 seems to be a leftover from a previous version of the code where there might have been multiple types
packages imported. Given that there's only one types
package imported now (aliased as types
on line 9), the alias types1
is unnecessary and could potentially cause confusion.
- types1 "github.com/cosmos/cosmos-sdk/types"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
types "github.com/cosmos/cosmos-sdk/crypto/types" | |
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | |
types2 "github.com/cosmos/cosmos-sdk/types" | |
types1 "github.com/cosmos/cosmos-sdk/types" | |
_ "github.com/cosmos/cosmos-sdk/types/tx/amino" | |
signing "github.com/cosmos/cosmos-sdk/types/tx/signing" | |
_ "github.com/cosmos/gogoproto/gogoproto" | |
proto "github.com/cosmos/gogoproto/proto" | |
any "github.com/cosmos/gogoproto/types/any" | |
types "github.com/cosmos/cosmos-sdk/crypto/types" | |
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | |
_ "github.com/cosmos/cosmos-sdk/types/tx/amino" | |
signing "github.com/cosmos/cosmos-sdk/types/tx/signing" | |
_ "github.com/cosmos/gogoproto/gogoproto" | |
proto "github.com/cosmos/gogoproto/proto" | |
any "github.com/cosmos/gogoproto/types/any" |
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" | ||
types1 "github.com/cosmos/cosmos-sdk/types" | ||
types "github.com/cosmos/cosmos-sdk/types" |
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.
The import alias types
is declared but not used in the visible code. If it's truly unused, it should be removed to keep the code clean and to follow Go best practices.
- types "github.com/cosmos/cosmos-sdk/types"
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
types "github.com/cosmos/cosmos-sdk/types" |
@@ -2,7 +2,7 @@ version: v1 | |||
plugins: | |||
- name: gocosmos | |||
out: .. | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any |
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.
Tip
Codebase Verification
The verification process revealed that the URL provided in the code change redirects from the 'master' branch to the 'main' branch, indicating that the URL is outdated. It's important to update the path to use the 'main' branch to ensure accuracy and alignment with current repository standards. The file is accessible, but the path correction is necessary.
Analysis chain
The update to the gocosmos
plugin option here is consistent with the overarching goals of the PR. Ensure the new path's correctness and compatibility.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify the new path is accessible and compatible
curl -I https://github.com/cosmos/gogoproto/blob/master/types/any.proto
Length of output: 4498
@@ -2,7 +2,7 @@ version: v1 | |||
plugins: | |||
- name: gocosmos | |||
out: .. | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any |
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.
Tip
Codebase Verification
The attempt to verify the new path's accessibility resulted in a HTTP 404 response, indicating that the file at https://github.com/cosmos/gogoproto/blob/main/types/any.proto
does not exist. This suggests that the updated path in the PR might be incorrect or the file has been moved or deleted from the specified location.
Analysis chain
The update to the gocosmos
plugin option is consistent with the PR's objectives. Ensure the new path's correctness and compatibility.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify the new path is accessible and compatible
curl -I https://github.com/cosmos/gogoproto/blob/master/types/any.proto
Length of output: 4493
Script:
#!/bin/bash
# Verify the redirected path is accessible
curl -I https://github.com/cosmos/gogoproto/blob/main/types/any.proto
Length of output: 4469
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.
Some alias are missing. Can we get a quick changelog as well or go doc on the alias that explains the reason
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- codec/types/any.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- codec/types/any.go
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Path instructions used (1)
CHANGELOG.md (1)
**/*.md
Assess the documentation for misspellings, grammatical errors, missing documentation and correctness
Additional comments (2)
CHANGELOG.md (2)
- 62-62: The documentation of the change related to PR refactor: bump gogoproto #19869 in the CHANGELOG.md is clear and accurately reflects the modifications made in the PR. This entry helps in tracking the significant change regarding the
Any
type replacement.- 62-62: The documentation of the enhancements related to PR feat(server): add custom start handler #19854 in the CHANGELOG.md is detailed and provides a clear understanding of the new customizability features added to the start command. This entry is well-documented and contributes to the transparency of changes made in the cosmos-sdk.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yml
Files selected for processing (1)
- codec/types/types_test.go (7 hunks)
Files skipped from review as they are similar to previous changes (1)
- codec/types/types_test.go
@@ -2,4 +2,4 @@ version: v1 | |||
plugins: | |||
- name: gocosmos | |||
out: ../.. | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types | |||
opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any |
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.
wanted to double check this is optional correct? chains dont have to do this as part of their upgrade?
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.
it is optional bc all public types are aliased, but could be a good idea to use the gogoproto path to not 'depend' on sdk types. But if is ok to use one or the other, I can clarify in the UPGRADING.md that this is indeed optional
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.
amazing, thank you!!
// returns an error if that value couldn't be packed. This also caches | ||
// the packed value so that it can be retrieved from GetCachedValue without | ||
// unmarshaling | ||
func NewAnyWithValue(v proto.Message) (*Any, error) { |
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.
do we want to alias this as well?
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.
yep, the alias is here
Line 35 in cccdb50
var NewAnyWithValue = gogoproto.NewAnyWithCacheWithValue |
where NewAnyWithCacheWithValue
is in fact the previous NewAnyWithValue
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.
Review Status
Actionable comments generated: 1
Configuration used: .coderabbit.yml
Files selected for processing (1)
- UPGRADING.md (1 hunks)
Path instructions used (1)
UPGRADING.md (1)
**/*.md
Assess the documentation for misspellings, grammatical errors, missing documentation and correctness
Due to the `Any` type moving to the `github.com/cosmos/gogoproto/types/any` repository, module developers must update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for correct mapping to the new `Any` type location. | ||
|
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.
Due to the Any
type moving to the github.com/cosmos/gogoproto/types/any
repository, module developers must update the buf.gen.gogo.yaml
configuration files by adjusting the corresponding opt
option to Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any
for correct mapping to the new Any
type location.
- Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types
+ Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Due to the `Any` type moving to the `github.com/cosmos/gogoproto/types/any` repository, module developers must update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for correct mapping to the new `Any` type location. | |
Due to the `Any` type moving to the `github.com/cosmos/gogoproto/types/any` repository, module developers must update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for correct mapping to the new `Any` type location. | |
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.
one less sdk import to worry about thank you!!
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.
Wohoo!
@@ -440,6 +440,9 @@ With the deprecation of the Amino JSON codec defined in [cosmos/gogoproto](https | |||
|
|||
For core SDK types equivalence is asserted by generative testing of [SignableTypes](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/rapidgen/rapidgen.go#L102) in [TestAminoJSON_Equivalence](https://github.com/cosmos/cosmos-sdk/blob/v0.50.0-beta.0/tests/integration/tx/aminojson/aminojson_test.go#L94). | |||
|
|||
Due to the `Any` type moving to the `github.com/cosmos/gogoproto/types/any` repository, module developers must update the `buf.gen.gogo.yaml` configuration files by adjusting the corresponding `opt` option to `Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any` for correct mapping to the new `Any` type location. |
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.
This is at the wrong place, should be https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#protobuf. And they don't have to, we should clarify it is optional but recommended (one less sdk import)
Description
Fully closes #19446
Bump gogoproto to v1.4.12.
Replace old codec/types/any with gogoproto/types/any
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.
I have...
Summary by CodeRabbit
Summary by CodeRabbit