protobuf-go/reflect
Damien Neil febffdd88e reflect/protoregistry: permit conflicting file names
Remove the requirement that all registered files have unique names.

Files.FindFileByPath now returns an error if multiple files match
the path. Files.RangeFiles iterates over all files, including ones with
the same name.

Unlike descriptor names, file names are not part of any of the wire
encodings. Conflicts in file names only affect file lookups by path,
which is an uncommon operation.

The Files.RegisterFile documentation already states (inaccurately),
"It is permitted for multiple files to have the same file path."
This change brings the behavior of RegisterFile in line with the
documentation.

Fixes golang/protobuf#1122

Change-Id: I2750e35736fd34def23fa6ab6d6a829095a65a26
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/321531
Trust: Damien Neil <dneil@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
2021-05-25 00:53:49 +00:00
..
protodesc reflect/protodesc: fix round-tripping for package field 2020-10-07 22:44:53 +00:00
protopath reflect: add protopath and protorange packages 2021-04-01 23:09:19 +00:00
protorange reflect/protorange: fix typo of func name in comment 2021-05-07 17:05:00 +00:00
protoreflect reflect/protoreflect: improve source information usability 2020-07-23 21:50:46 +00:00
protoregistry reflect/protoregistry: permit conflicting file names 2021-05-25 00:53:49 +00:00