Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error for non repeated fields being listed twice in TextFormat #1160

Open
thomasvl opened this issue Aug 2, 2021 · 0 comments
Open
Labels
kind/bug Feature doesn't work as expected. ⚠️ semver/major Breaks existing public API.

Comments

@thomasvl
Copy link
Collaborator

thomasvl commented Aug 2, 2021

Looking at the C++ code:

https://github.com/protocolbuffers/protobuf/blob/6051341ab21b4e1f75e91710ab1a8cc8fadda521/src/google/protobuf/text_format.cc#L536-L540

They error if a field is listed twice in TextFormat if it wasn't a repeated field. The code for oneofs is right near it, but Swift doesn't seem to have this support.

Quickly skimming the controls, there is a toggle for this, but it seems like an internal impl detail that can't be shut off from the public api.

@thomasvl thomasvl added kind/bug Feature doesn't work as expected. ⚠️ semver/major Breaks existing public API. labels Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Feature doesn't work as expected. ⚠️ semver/major Breaks existing public API.
Projects
None yet
Development

No branches or pull requests

1 participant