Switch to gogo and yarpc compilers #4040
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It seems that previous switch to use google/protobuf 1.4.x (v2) compiler was made too soon. This is due to the fact, that in Cadence we use YARPC framework which is still on gogo. Messages in gogo are not compatible with 1.4.x protobuf library and causes panics during serialization. YARPC is in the process of migrating off gogo. But as I was told it is at least several months away.
In order for GRPC migration to move forward, we will switch back to gogo. However this is not a pure revert of previous PR. We still want to get rid of all gogo extensions. Having them will make future switch to protobuf 1.4.x more difficult.
To generate YARPC server and client code
protoc-gen-yarpc-go
plugin is used. Currently used version does not support alias ingo_package
option however. A fix was made for it. Since it is not released yet, I have added a temporaryreplace
in go.mod for it. Anotherreplace
is necessary for apache/thrift. Updatedyarpc
module brings new version of apache/thrift with breaking changes. Howevertchannel-go
andringpop-go
still uses older one.