Commit Graph

4 Commits

Author SHA1 Message Date
Joe Tsai
27af11f144 internal: improve use of detrand in descfmt and errors
Use a non-breaking space instead of two spaces to vary the output.
This keeps the mutated version aesthetically similar to the normal one.

Change-Id: Ib4ade2795004fe5b30e454e7e533e5a0e3a9ffa2
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/194157
Reviewed-by: Herbie Ong <herbie@google.com>
2019-09-09 18:30:00 +00:00
Joe Tsai
e182c917f0 reflect/protoreflect: add FileDescriptor.SourceLocations
This adds minimal support for preserving the source context information.

Change-Id: I4b3cac9690b7469ecb4e5434251a809be4d7894c
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/183157
Reviewed-by: Damien Neil <dneil@google.com>
2019-07-13 00:15:59 +00:00
Joe Tsai
01887a85f5 reflect/protoreflect: remove FieldDescriptor.{Oneof,Extendee} methods
This is a breaking change in light of new methods added in CL/176977.

This removes:
	FieldDescriptor.Oneof: replacement is ContainingOneof
	FieldDescriptor.Extendee: replacement is IsExtension and ContainingMessage

Change-Id: I82008e46fb3b80de8e8a0ac42afc54e8c4b67411
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/176942
Reviewed-by: Damien Neil <dneil@google.com>
2019-06-17 19:43:30 +00:00
Joe Tsai
63bdd1f864 internal/descfmt: rename from typefmt
The name descfmt more closely matches the fact that this package
provides pretty-printing for descriptors.

Change-Id: I11b0e4a0302962ee7bbf315fb259d050847cadbb
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/178479
Reviewed-by: Damien Neil <dneil@google.com>
2019-05-22 14:46:27 +00:00