Protobuf teams patch generated imports and rename schemas to avoid collisions
Protobuf teams, especially Python developers in multi-service repositories, cannot always map generated files and imports to the package names their build and runtime expect. Generated Python code may contain incorrect or invalid import paths, including paths with reserved keywords, while duplicate proto filenames can collide in Go or Python registries. Developers compensate by renaming schema files, forking or renaming packages, or rewriting generated files with shell scripts—brittle steps outside the normal code-generation flow.
For teams generating Protobuf code in Python and Go. Mentioned from Jan 2020 to Sep 2024 on GitHub and Hacker News.
6 different people described this problem in 2 separate discussions.
- Indie fit
- 6.0/10
- Pain
- 6.7/10
- Frequency
- 7.0/10
- Willingness to pay
- 0.0/10
- Momentum
- 5.0/10
- Who pays
- Businesses
- Competition
- Medium
- Build difficulty
- Medium
What people said
Quoted word for word. Follow a link to read the whole discussion.
This is a major pain in the ass both in Go and Python and basically forces you to ensure than no 2 services have the same file called "api/users/service.proto". There have been multiple instances where we literally had to rename a proto file to something like reponame_service.proto to avoid this limitation
kostyay on Hacker NewsSep 2024I'm seeing it break down with other tools, i.e. bazel, and am having to fork and rename packages
See what to build and who will buy it
- 2 product ideas with the smallest useful version and pricing
- 4 places to find your first customers
- 4 more quotes from people who have this problem
- Current workarounds, existing solutions and risks