protobuf-go/internal/filedesc
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
..
build_test.go all: implement proto1 weak fields 2019-07-15 18:44:12 +00:00
build.go internal/filedesc: print warnings on registration conflicts 2019-07-18 02:19:58 +00:00
desc_init.go internal/strs: unify string manipulation functionality 2019-07-09 19:57:23 +00:00
desc_lazy.go all: support enforce_utf8 override 2019-07-15 19:53:05 +00:00
desc_list_gen.go internal/filedesc, internal/filetype: initial commit 2019-06-20 02:06:11 +00:00
desc_list.go reflect/protoreflect: add FileDescriptor.SourceLocations 2019-07-13 00:15:59 +00:00
desc_test.go proto: move T->*T wrappers from internal/scalar to proto 2019-07-12 17:35:01 +00:00
desc.go reflect/protoregistry: provide more informative errors for conflicts 2019-07-15 20:39:24 +00:00
placeholder.go reflect/protoreflect: add FileDescriptor.SourceLocations 2019-07-13 00:15:59 +00:00