-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use standard proto functions for Marshal/Unmarshal and Size (#994)
Some of the code interacting with protobufs was calling functions emitted by the proto compiler directly on the protobuf structs; `proto_obj.Marshal`, `proto_obj.Unmarshal`, `proto_obj.Size`. These functions are no longer emitted by the upstream protobuf compiler, only by gogo/protobuf. Users who don't use the pregenerated `pb.pb.go`, but instead recompile the proto files using the upstream compiler will encounter compilations failures. (I hit this because that's the default mode for importing go projects using bazel and gazelle). These commits change any code that was using these functions to use the standard proto library functions: `proto.Marshal`, `proto.Unmarshal`, and `proto.Size`. These changes shouldn't cause any performance effects --- the implementations of each of these functions call out, directly or indirectly, to the directly-attached functions, if they exist.
- Loading branch information
Showing
5 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters