andrewhickman / prost-reflect

A protobuf library extending prost with reflection support and dynamic messages.
https://crates.io/crates/prost-reflect
Apache License 2.0
86 stars 19 forks source link

Handling of duplicate file names #39

Open andrewhickman opened 1 year ago

andrewhickman commented 1 year ago

Currently if two files with the same name are added, the second one is silently ignored. This is intended to support loading the same dependency from multiple file descriptor sets (especially common ones like the google/protobuf files. However this behaviour might be confusing if the files have different content.

Additionally, its annoying to have to come up with a unique filename when adding files programatically (#30, #32). Maybe the library should allow skip the uniqueness check for such files (e.g. by setting the name field to None)