Skip to content

Commit

Permalink
refactor: remove gogoproto stringer annotations (#14046)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Nov 29, 2022
1 parent 8bb4521 commit a1b09a0
Show file tree
Hide file tree
Showing 43 changed files with 1,844 additions and 2,064 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking Changes

* (modules) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850) and [#14046](https://github.com/cosmos/cosmos-sdk/pull/14046) Remove gogoproto stringer annotations. This removes the custom `String()` methods on all types that were using the annotations.
* (x/auth) [#13850](https://github.com/cosmos/cosmos-sdk/pull/13850/) Remove `MarshalYAML` methods from module (`x/...`) types.
* (x/auth) [#13877](https://github.com/cosmos/cosmos-sdk/pull/13877) Rename `AccountKeeper`'s `GetNextAccountNumber` to `NextAccountNumber`.
* (x/evidence) [#13740](https://github.com/cosmos/cosmos-sdk/pull/13740) The `NewQueryEvidenceRequest` function now takes `hash` as a HEX encoded `string`.
Expand Down
4 changes: 2 additions & 2 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ The SDK is in the process of removing all `gogoproto` annotations.

#### Stringer

The `Stringer` implementation of some packages use `proto.CompactTextString` for _stringify_ a struct.
Please [verify](https://github.com/cosmos/cosmos-sdk/pull/13850#issuecomment-1328889651) the usage of the `.String()` method in your application. An chain should not rely on it for any state-machine related operation.
The `gogoproto.goproto_stringer = false` annotation has been removed from most proto files. This means that the `String()` method is being generated for types that previously had this annotation. The generated `String()` method uses `proto.CompactTextString` for _stringifying_ structs.
[Verify](https://github.com/cosmos/cosmos-sdk/pull/13850#issuecomment-1328889651) the usage of the modified `String()` methods and double-check that they are not used in state-machine code.

## [v0.47.x](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.0)

Expand Down
54 changes: 27 additions & 27 deletions api/cosmos/capability/v1beta1/capability.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a1b09a0

Please sign in to comment.