Skip to content

Commit

Permalink
chore: remove double registration warning (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored May 11, 2023
1 parent 413865a commit 28c37ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

## [v1.4.10](https://github.com/cosmos/gogoproto/releases/tag/v1.4.10) - 2023-05-11

- [#67](https://github.com/cosmos/gogoproto/pull/67) Remove warning about double registration. The Cosmos SDK does purposely double-registration so this warning is not useful.

## [v1.4.9](https://github.com/cosmos/gogoproto/releases/tag/v1.4.9) - 2023-05-03

### Breaking changes
Expand Down
3 changes: 1 addition & 2 deletions proto/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,12 @@ func RegisterFile(filename string, fileDescriptor []byte) {
// only register files if they are registered the first time
// this isn't ideal, but it's needed to make tests pass and some legacy
// code bases may have this issue, and we don't want to fail them here
// when the file is already registered, no warning is displayed.
if _, err := gogoProtoRegistry.FindFileByPath(file.Path()); err != nil {
err = gogoProtoRegistry.RegisterFile(file)
if err != nil {
panic(err)
}
} else {
fmt.Printf("WARNING: proto: file %q already registered\n", file.Path())
}
}

Expand Down

0 comments on commit 28c37ed

Please sign in to comment.