Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Add synchronous stubs #14

Merged
merged 15 commits into from
Mar 29, 2025
Merged

Add synchronous stubs #14

merged 15 commits into from
Mar 29, 2025

Conversation

AdrienVannson
Copy link
Contributor

@leonardgerardatomicmachinescom

Would be even nicer now that you made grpclib optional.
Before I spend a bit of time getting my MR on top of your code, can you give me (everyone) a timeline for when you will have a release, and what are the plans for supporting the code.
We would like to switch to a better betterproto, and your fork might be that, but we need some confidence before switching.

@AdrienVannson
Copy link
Contributor Author

Sorry, I missed your comment. Yes, I plan to make grpclib optional. I think I will merge this in a few days.

Thank you for your interest! I think it will take me a few months before the first stable release (I hope it will be less, but it will depend on how the development goes). I want to avoid breaking changes after this release, so I'd like to make sure everything is fine before doing so. After that, yes, I plan to keep maintaining the library.

@AdrienVannson AdrienVannson force-pushed the sync-stubs branch 2 times, most recently from 0aba274 to 1c5a909 Compare March 18, 2025 13:59
@AdrienVannson AdrienVannson requested a review from Copilot March 29, 2025 13:24
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds synchronous stub support by introducing a new client generation option throughout the codebase. Key changes include updating the protoc command options in tests, adding a ClientGeneration enum with new properties in the settings, and updating the plugin parser to handle the new client_generation option.

Reviewed Changes

Copilot reviewed 6 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/util.py Inserts new command-line options for client_generation in protoc invocation.
tests/inputs/simple_service/simple_service.proto Adds a basic proto file for testing the new client generation functionality.
src/betterproto2_compiler/settings.py Introduces a ClientGeneration enum and adds a client_generation field to the Settings dataclass.
src/betterproto2_compiler/plugin/parser.py Updates get_settings to parse client_generation options and return a Settings instance accordingly.
pyproject.toml Updates dependency definitions to include grpc-async extras and adds the strenum dependency.
Files not reviewed (5)
  • src/betterproto2_compiler/templates/header.py.j2: Language not supported
  • src/betterproto2_compiler/templates/service_stub.py.j2: Language not supported
  • src/betterproto2_compiler/templates/service_stub_async.py.j2: Language not supported
  • src/betterproto2_compiler/templates/service_stub_sync.py.j2: Language not supported
  • src/betterproto2_compiler/templates/template.py.j2: Language not supported

@AdrienVannson AdrienVannson merged commit a7d4041 into main Mar 29, 2025
16 checks passed
@AdrienVannson AdrienVannson deleted the sync-stubs branch March 29, 2025 13:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants