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

Make the toString of enums be the value if names are omitted #649

Merged
merged 4 commits into from
May 17, 2022

Conversation

osa1
Copy link
Member

@osa1 osa1 commented May 16, 2022

Use the field index for field numbers in GeneratedMessage.toString if
field names are omitted.

The new test is not run with make run-tests. To run manually: (in
protoc_plugin/)

$ dart pub get
$ make protos
$ dart run test/omit_enum_names_test.dart
$ dart -Dprotobuf.omit_enum_names=true run test/omit_enum_names_test.dart

Port of cl/322743819

Use the field index for field numbers in GeneratedMessage.toString if
field names are omitted.

The new test is not run with `make run-tests`. To run manually: (in
protoc_plugin/)

    $ dart pub get
    $ make protos
    $ dart run test/omit_enum_names_test.dart
    $ dart -Dprotobuf.omit_enum_names=true run test/omit_enum_names_test.dart

Port of cl/322743819
@osa1 osa1 requested a review from sigurdm May 16, 2022 08:13
Copy link
Collaborator

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@osa1 osa1 merged commit 117e869 into google:master May 17, 2022
@osa1 osa1 deleted the cl_322743819 branch May 17, 2022 13:05
osa1 added a commit to osa1/protobuf.dart that referenced this pull request May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants