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

[grpc-protoc] Add an option to generate default service methods #3110

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Commits on Nov 19, 2024

  1. Configuration menu
    Copy the full SHA
    60ac59d View commit details
    Browse the repository at this point in the history
  2. Add option to the protoc code generator to avoid generating deprecate…

    …d code (apple#3089)
    
    ### Motivation
    
    The generated ServiceTalk gRPC stubs make use of deprecated calls. This causes a problem when `-Werror` is used to build the code since it will automatically fail the build. We should allow users who have already migrated their code to prevent the protoc compiler from generating and using deprecated references.
    
    ### Modifications
    
    Add an option, `skipDeprecated`, as part of the protoc compiler configuration, to tell the generator to leave out deprecated references.
    
    Remove
    - initSerializationProvider, reason: ContentCodec is deprecated
    - isSupportedMessageCodingsEmpty, reason ContentCodec is deprecated
    - Deprecated ServiceFactory constructors
    - ServiceFactory::Builder references to ContentCodec
    - Generated client metadata and associated methods, reason: deprecated
    
    ### Result
    
    Users can generate gRPC stubs without deprecated code.
    
    ### Testing
    
    Manually tested:
    - Add new option to ServiceTalk/examples/grpc/protoc-options and use it to generate test_service.proto which covers all combinations of streaming (or not) services.
    mgodave committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    cc93b8a View commit details
    Browse the repository at this point in the history
  3. Address feedback

    mgodave committed Nov 19, 2024
    Configuration menu
    Copy the full SHA
    7ed1fe5 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2024

  1. feedback

    mgodave committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    c2d1688 View commit details
    Browse the repository at this point in the history
  2. remove test_service.proto

    mgodave committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    7845ebb View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2024

  1. Configuration menu
    Copy the full SHA
    9120c33 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2024

  1. Configuration menu
    Copy the full SHA
    49ebbe2 View commit details
    Browse the repository at this point in the history
  2. fix copy-pasta

    mgodave committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    2c4b42c View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2024

  1. Revert "fix copy-pasta"

    This reverts commit 2c4b42c.
    mgodave committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    58c586b View commit details
    Browse the repository at this point in the history
  2. Revert "refactor how we determine which methods need a default implem…

    …entation"
    
    This reverts commit 49ebbe2.
    mgodave committed Dec 3, 2024
    Configuration menu
    Copy the full SHA
    9aa486b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44985b0 View commit details
    Browse the repository at this point in the history