protobuf-go/reflect/protoregistry
Joe Tsai 1ac7b53cc5 internal/filedesc: print warnings on registration conflicts
Rather than panicking at init time due to registration failures,
print a warning to stderr. Historically, the Go protobuf implementation
has not been strict about registration conflicts, which has led users
to unknowningly tolerating conflicts that may or may not expose
themselvs as a bug.

Registration conlicts now produce a log message:
<<<
2019/07/17 17:36:42 WARNING: proto: file "path/to/example.proto" is already registered
	previously from: "example.com/company/example_proto"
	currently from:  "example.com/user/example_proto"
A future release will panic on registration conflicts.

>>>

Change-Id: I2d583f04977c8bc8cb6bbd33d239277690bbec54
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/186181
Reviewed-by: Damien Neil <dneil@google.com>
2019-07-18 02:19:58 +00:00
..
testprotos reflect/protoregistry: provide more informative errors for conflicts 2019-07-15 20:39:24 +00:00
registry_test.go reflect/protoreflect: add Enum.Type and Message.Type 2019-07-12 23:43:21 +00:00
registry.go internal/filedesc: print warnings on registration conflicts 2019-07-18 02:19:58 +00:00