Protobuf API V2: finish implementation and switchover skycfg to using new impl #93
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.
This PR is currently stacked on top of #90, please review by commit
Summary
This PR completes the implementation on the new go protobuf v2 api, and makes the cutover to using the new implementation (points skycfg.go at go/protomodule, deletes internal/go/skycfg).
Specifically this pr
protomodule.go
's global functions (e.g.proto.clear
) to operate on the new*protoMessage
object rather than the old message type.package
toprotomodule
and finishes implementingmessage_type
so thatpkg = proto.package("skycfg.test_proto")
will return an object representing the package, and thenpkg.MessageV3
returns an object (protoMessageType
) (that can construct a new*protoMessage
withMessageV3
internal/go/skycfg
, but movesinternal/go/skycfg/skycfg_test.go
to the top level directoryskcyfg.go
to use the newgo/protomodule
Test
This PR adds the original
internal/go/skycfg/proto_test.go
andinternal/go/skycfg/skycfg_test.go
to testing the new implementationI have also tested this internally on our existing usage of skycfg, snapshotting before and after the implementation switch and confirming there are no differences in output (at least in our usage)