From 62ba3b23412b593166700cac2761d6d8cbcea7d2 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 28 Mar 2024 21:02:58 +0100 Subject: [PATCH 1/2] docs: reword upgrading.md --- UPGRADING.md | 7 +++---- scripts/go-mod-tidy-all.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/UPGRADING.md b/UPGRADING.md index ba8f57630a8c..cba42d81b31f 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -148,6 +148,8 @@ There is no longer a need for the Cosmos SDK to host these protos for itself and That package containing proto v2 generated code, but the SDK now uses [buf generated go SDK instead](https://buf.build/docs/bsr/generated-sdks/go). If you were depending on `cosmossdk.io/api/tendermint`, please use the buf generated go SDK instead, or ask CometBFT host the generated proto v2 code. +The `codectypes.Any` has move to `github.com/cosmos/gogoproto/types/any`. Module developers can 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 directly mapping the`Any` type to its new location. This change is optional as `codectypes.Any` is aliased to `gogoproto.Any` in the SDK. + ### Modules #### `**all**` @@ -440,10 +442,7 @@ 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. - - -**TODO: summarize proto annotation requirements.** +Read more about the available annotations [here](https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations). #### Stringer diff --git a/scripts/go-mod-tidy-all.sh b/scripts/go-mod-tidy-all.sh index adbac085dded..103d9592daff 100755 --- a/scripts/go-mod-tidy-all.sh +++ b/scripts/go-mod-tidy-all.sh @@ -13,8 +13,8 @@ done # automatically. cd simapp if command -v nix &> /dev/null - nix develop .. -c gomod2nix then + nix develop .. -c gomod2nix if ! command -v gomod2nix &> /dev/null then echo "gomod2nix could not be found in PATH, installing..." From 91347386c9eaab57ec8ec565c63f643d0ec0b7fc Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 29 Mar 2024 11:17:10 +0100 Subject: [PATCH 2/2] Update UPGRADING.md --- UPGRADING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING.md b/UPGRADING.md index cba42d81b31f..6126ce607b9c 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -148,7 +148,7 @@ There is no longer a need for the Cosmos SDK to host these protos for itself and That package containing proto v2 generated code, but the SDK now uses [buf generated go SDK instead](https://buf.build/docs/bsr/generated-sdks/go). If you were depending on `cosmossdk.io/api/tendermint`, please use the buf generated go SDK instead, or ask CometBFT host the generated proto v2 code. -The `codectypes.Any` has move to `github.com/cosmos/gogoproto/types/any`. Module developers can 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 directly mapping the`Any` type to its new location. This change is optional as `codectypes.Any` is aliased to `gogoproto.Any` in the SDK. +The `codectypes.Any` has moved to `github.com/cosmos/gogoproto/types/any`. Module developers can 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 directly mapping the`Any` type to its new location. This change is optional as `codectypes.Any` is aliased to `gogoproto.Any` in the SDK. ### Modules