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

Commits on May 16, 2022

  1. Make the toString of enums be the value if names are omitted.

    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 committed May 16, 2022
    Configuration menu
    Copy the full SHA
    b895238 View commit details
    Browse the repository at this point in the history
  2. Fix field names too

    osa1 committed May 16, 2022
    Configuration menu
    Copy the full SHA
    2e0db9b View commit details
    Browse the repository at this point in the history
  3. Fix field tag number

    osa1 committed May 16, 2022
    Configuration menu
    Copy the full SHA
    dca98c9 View commit details
    Browse the repository at this point in the history
  4. Fix formatting

    osa1 committed May 16, 2022
    Configuration menu
    Copy the full SHA
    8b8d690 View commit details
    Browse the repository at this point in the history