You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello 👋
We have a large protobuf repo, using golang codegen, most of which is based on the V1 go message format. We are now starting to move to using the V2 message format, and are using vtprotobuf for fast (de)serialization. However, we cannot do the migration all at once. Due to this, we have V2 generated code, that can depend on V1 format generated code during the migration. So, we need the vtproto-generated code to be compatible with the older code.
To handle such scenarios, it would be very helpful if there is an ability to substitute google.golang.org/protobuf/proto with github.com/golang/protobuf/proto. This would make our migration a lot smoother.
This could be exposed via an option/flag at codegen time.
… gen_build_proto
Summary:
In `gen_build_proto.py`, ignore `go_package` requirements for proto files in `configs/proto/google/protobuf`
Use the script from (1) to add `go_package` option to hulk proto files, and all its dependencies.
Modify `rpc_stubs.go` to change the package name for generated go code. Earlier, a proto package like `hulk.driver` would generate a go package with name `hulk_driver`. Instead, now we simply have the go package name `driver`. This was done to match `protoc-gen-godbx` behaviour with that of `protoc-gen-go`
Mark `github.com/planetscale/vtprotobuf` as dirty in `.dbxvendor.json`, while we get a fix for planetscale/vtprotobuf#18, and add a hack to the repo.
Substitute using `github.com/gogo/protobuf/proto` with `github.com/golang/protobuf/proto` in `/go/src/dropbox/hulk/*` to remove usage of gogoproto
GitOrigin-RevId: dddc8e25678549687004135369733d7ee4c75490
Hello 👋
We have a large protobuf repo, using golang codegen, most of which is based on the V1 go message format. We are now starting to move to using the V2 message format, and are using
vtprotobuf
for fast (de)serialization. However, we cannot do the migration all at once. Due to this, we have V2 generated code, that can depend on V1 format generated code during the migration. So, we need the vtproto-generated code to be compatible with the older code.To handle such scenarios, it would be very helpful if there is an ability to substitute
google.golang.org/protobuf/proto
withgithub.com/golang/protobuf/proto
. This would make our migration a lot smoother.This could be exposed via an option/flag at codegen time.
cc @euroelessar
The text was updated successfully, but these errors were encountered: