mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-04 02:38:50 +00:00
eeca8bb946
In order to transition more of v1 proto package to use the v2 API, we need the v2 API to stop depending on v1 proto. The legacy package currently depends on v1 proto because it needs to unmarshal the descriptor protos. Ideally, we would switch this to use the v2 implementation of wire unmarshaling. However, that is not available yet. So, instead, we vendor a minified version of the v1 proto package that only supports unmarshaling. The only changes to the vendored v1 code are: * Delete code not needed to implement proto.Unmarshal * Drop support for message sets * Drop support for reporting the full field name for required not set errors The unused tool was used to delete unrelated code: https://github.com/dominikh/go-tools/tree/master/cmd/unused To verify that the dependency was dropped: $ cd internal/legacy $ go list -f "{{join .Deps \"\n\"}}" | sort | uniq | grep protobuf github.com/golang/protobuf/protoapi github.com/golang/protobuf/v2/internal/detrand github.com/golang/protobuf/v2/internal/encoding/tag github.com/golang/protobuf/v2/internal/encoding/text github.com/golang/protobuf/v2/internal/encoding/wire github.com/golang/protobuf/v2/internal/errors github.com/golang/protobuf/v2/internal/flags github.com/golang/protobuf/v2/internal/impl github.com/golang/protobuf/v2/internal/legacy/protoV1 github.com/golang/protobuf/v2/internal/pragma github.com/golang/protobuf/v2/internal/scalar github.com/golang/protobuf/v2/internal/set github.com/golang/protobuf/v2/internal/value github.com/golang/protobuf/v2/reflect/protoreflect github.com/golang/protobuf/v2/reflect/prototype github.com/golang/protobuf/v2/runtime/protoimpl github.com/golang/protobuf/v2/types/descriptor Change-Id: I470865f1a987203574339fefc7d83843a12af966 Reviewed-on: https://go-review.googlesource.com/c/152545 Reviewed-by: Damien Neil <dneil@google.com> |
||
---|---|---|
.. | ||
protoV1 | ||
enum.go | ||
export.go | ||
extension_test.go | ||
extension.go | ||
file_test.go | ||
file.go | ||
message.go |