Skip to content

Commit

Permalink
docs: Require correct gogo import paths (backport #14852) (#14853)
Browse files Browse the repository at this point in the history
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
  • Loading branch information
3 people committed Jan 31, 2023
1 parent 35cd757 commit 5f4ddc6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

## [v0.47.0-rc2](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0-rc2) - 2023-01-31

### Improvements

* (deps) [#14830](https://github.com/cosmos/cosmos-sdk/pull/14830) Bump to IAVL `v0.19.5-rc.1`.
* (tools) [#14793](https://github.com/cosmos/cosmos-sdk/pull/14793) Dockerfile optimization.
* (x/gov) [#13010](https://github.com/cosmos/cosmos-sdk/pull/13010) Partial cherry-pick of this issue for adding proposer migration.
* [#14691](https://github.com/cosmos/cosmos-sdk/pull/14691) Change behavior of `sdk.StringifyEvents` to not flatten events attributes by events type.
Expand All @@ -64,7 +67,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* This is a behavior change, as previously `sdk.Coins.Add` would return `nil` in this case.
* (reflection) [#14838](https://github.com/cosmos/cosmos-sdk/pull/14838) We now require that all proto files' import path (i.e. the OS path) matches their fully-qualified package name. For example, proto files with package name `cosmos.my.pkg.v1` should live in the folder `cosmos/my/pkg/v1/*.proto` relatively to the protoc import root folder (usually the root `proto/` folder.

## [v0.47.0-rc1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0-rc1) - 2022-01-09
## [v0.47.0-rc1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0-rc1) - 2023-01-09

### Features

Expand Down
6 changes: 3 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cosmos SDK v0.47.0-rc1 Release Notes
# Cosmos SDK v0.47.0-rc2 Release Notes

Cosmos SDK `v0.47.0-rc1` contains all the features and changes that are planned for the final v0.47.0 release.
Cosmos SDK `v0.47.0-rc2` contains all the features and changes that are planned for the final v0.47.0 release.
This release candidate is intended to give application developers and validator operators a chance to test the release candidate before the final release.

The main changes in this release are:
Expand Down Expand Up @@ -40,4 +40,4 @@ Refer to the [UPGRADING.md](https://github.com/cosmos/cosmos-sdk/blob/release/v0
Please see the [CHANGELOG](https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/CHANGELOG.md) for an exhaustive list of changes.

Full Commit History (previous version): https://github.com/cosmos/cosmos-sdk/compare/release/v0.46.x...release/v0.47.x
Full Commit History (`alpha2..beta1`): https://github.com/cosmos/cosmos-sdk/compare/v0.47.0-beta1...v0.47.0-rc1
Full Commit History (`rc1..rc2`): https://github.com/cosmos/cosmos-sdk/compare/v0.47.0-rc1...v0.47.0-rc2
10 changes: 10 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ Please use the `ghcr.io/cosmos/proto-builder` image (version >= `0.11.5`) for ge

See which buf commit for `cosmos/cosmos-sdk` to pin in your `buf.yaml` file [here](./proto/README.md).

#### Gogoproto Import Paths

The SDK made a [patch fix](https://github.com/cosmos/gogoproto/pull/32) on its gogoproto repository to require that each proto file's package name matches its OS import path (relatively to a protobuf root import path, usually the root `proto/` folder, set by the `protoc -I` flag).

For example, assuming you put all your proto files in subfolders inside your root `proto/` folder, then a proto file with package name `myapp.mymodule.v1` should be found in the `proto/myapp/mymodule/v1/` folder. If it is in another folder, the proto generation command will throw an error.

If you are using a custom folder structure for your proto files, please reorganize them so that their OS path matches their proto package name.

This is to allow the proto FileDescriptSets to be correctly registered, and this standardized OS import paths allows [Hubl](https://github.com/cosmos/cosmos-sdk/tree/main/tools/hubl) to reflectively talk to any chain.

#### `{accepts,implements}_interface` proto annotations

The SDK is normalizing the strings inside the Protobuf `accepts_interface` and `implements_interface` annotations. We require them to be fully-scoped names. They will soon be used by code generators like Pulsar and Telescope to match which messages can or cannot be packed inside `Any`s.
Expand Down
2 changes: 1 addition & 1 deletion simapp/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.3
cosmossdk.io/math v1.0.0-beta.4
cosmossdk.io/tools/rosetta v0.2.0
github.com/cosmos/cosmos-sdk v0.47.0-alpha2
github.com/cosmos/cosmos-sdk v0.47.0-rc2
github.com/golang/mock v1.6.0
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.3
cosmossdk.io/math v1.0.0-beta.4
cosmossdk.io/simapp v0.0.0-00010101000000-000000000000
github.com/cosmos/cosmos-sdk v0.47.0-alpha2
github.com/cosmos/cosmos-sdk v0.47.0-rc2
github.com/cosmos/gogoproto v1.4.4
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.0
Expand Down

0 comments on commit 5f4ddc6

Please sign in to comment.