Skip to content

Conversation

rami-lv
Copy link

@rami-lv rami-lv commented Apr 17, 2023

Problem

When using the protoc --twirpy_out command to generate Python Twirp API code, the plugin generates an empty file for every .proto file dependency that has no services defined. This behavior can be inconvenient and confusing, especially in large projects where many proto files are present.

Proposed Solution

To address this issue, this PR proposes modifying the plugin to only run the twirpy generator if the .proto file contains services. If a file does not define any services, the plugin will skip generating any code for that file.

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.

1 participant