docs: Require correct gogo import paths (#14852)
This commit is contained in:
@@ -35,6 +35,16 @@ The SDK is in the process of removing all `gogoproto` annotations.
|
||||
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.
|
||||
|
||||
#### 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.
|
||||
|
||||
### Types
|
||||
|
||||
#### Store
|
||||
|
||||
Reference in New Issue
Block a user