danielgtaylor / danielgtaylor/python-betterproto

Plugin should not compile all dependencies

Offen
#111 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement medium medium priority
Vorherrschende Sprache
Python
Sterne
1.8k
Forks
234
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Right now I have a lot of library protos and grpc protos living in one place, the library protos are cross-used by multiple rpc protos, but they seem to not follow the output standard that protoc has for other languages.

Example:
```
root
├── util
│ ├── resource.proto
│ └── someotherutil.proto
├── boxes
│ ├── box_schematic_schemas.proto
│ └── boxes.proto
├── some_rpc
│ └── some.rpc.proto
├── box_rpc
│ └── box.rpc.proto
├── quadcopters_rpc
│ └── quadcopters.rpc.proto
```
the example above is made up on the fly, but this is similar to what I have today in my environment to work with (the server impls are written in golang using grpc) Now I want to make python libraries for the above, but when i call protoc betterproto generation on "bpx.rpc.proto" two problems happen:
1) betterproto doesn't generate paths, it sticks everything in root (other protoc plugins use . as reletive to the file)
2) all the utils are re-generated for each proto as opposed to use the ones that had been generated prior (my guess is because of 1

This is the real issue here is that we have a LOT of proto files and sometimes only generate some (e.g.: I've updated quadcopters, just want to re-generate that, not all the dependancies. Is this a missing features or am i missing something in betterproto that allows for doing standard generation w/o generating dependancies like in the other language examples?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die beschriebene Generierung mit dem Beispiel-proto-Layout und einem betterproto-protoc-Aufruf zu reproduzieren. Vergleiche die generierten Pfade und die wiederholte Ausgabe von Abhängigkeiten mit dem Verhalten von standard protoc; abgeschlossen ist dies, wenn ein Ziel-RPC-proto selektiv generiert wird, ohne Pfade zu verflachen oder seine Abhängigkeiten unnötig erneut zu generieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
28/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.