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 ServiceTalk protoc plugin extensible #2160

Merged
merged 2 commits into from
Apr 13, 2022

Conversation

suman-ganta
Copy link
Contributor

Summary of change in one line.

Adds plugin insertion point (comment) into servicetalk generated service classes.

Motivation:

When we want to enrich ServiceTalk generated service classes with additional functionality, this insertion point enables to add such code.

Why is this change being made?

When we want to enrich ServiceTalk generated service classes with additional functionality, this insertion point enables to add such code.

Modifications:

  • List the changes
    Since JavaPoet has no way to add a comment within a class, Added an empty type as place holder and replaced it with the comment before adding the content to CodeGeneratorResponse

Result:

What is the result of this change?
Every ServiceTalk generated service class will have following comment towards the end of the class.

// @@protoc_insertion_point(service_scope:<fully qualified name of service>)

@suman-ganta suman-ganta force-pushed the service_insertion_point branch from 08c500a to 1c08a11 Compare March 22, 2022 23:39
Adds plugin insertion point (comment) into servicetalk generated service classes.
Motivation:
When we want to enrich ServiceTalk generated service classes with additional functionality, this insertion point enables to add such code.
Why is this change being made?
When we want to enrich ServiceTalk generated service classes with additional functionality, this insertion point enables to add such code.
Modifications:

- List the changes
Since JavaPoet has no way to add a comment within a class, Added an empty type as place holder and replaced it with the comment before adding the content to CodeGeneratorResponse

Result:

What is the result of this change?
Every ServiceTalk generated service class will have following comment towards the end of the class.
// @@protoc_insertion_point(service_scope:<fully qualified name of service>)
@suman-ganta suman-ganta force-pushed the service_insertion_point branch from 1c08a11 to 5f817ce Compare March 23, 2022 00:05
@bondolo bondolo added the enhancement New feature or request label Apr 8, 2022
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

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

Thank you @suman-ganta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants