googleapis / googleapis/google-cloud-cpp
Audit `additional_proto_files`
- Langage dominant
- C++
- Étoiles
- 659
- Forks
- 462
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 89
Description
LROs have an annotation for their returned metadata type. Proto syntax does not require `import`s for the proto files that define these metadata types. In C++ we have to include these files.
Our intention for `additional_proto_files` was to add includes for these extra `*.pb.h` headers.
Turns out that when we feed them into `protoc` we treat them the same as any other service's proto file.
https://github.com/googleapis/google-cloud-cpp/blob/a86e887fe2756935a51d4d93b42e45a0fdde7812/generator/standalone_main.cc#L314-L317
This leads to some weirdness in the generator config. In `notebooks` and `run`, we rely on this behavior to generate some clients (and avoid #7997). In `containeranalysis`, we accidentally generate a client for `grafeas` which we did not intend to. Oops.
We should sort this out.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Lisez generator/standalone_main.cc autour des lignes 314-317, puis examinez la configuration du générateur pour notebooks, run et containeranalysis. Déterminez comment additional_proto_files sont transmis à protoc par rapport à leur utilisation pour les en-têtes supplémentaires. Le travail est terminé lorsque les clients générés prévus sont conservés tout en évitant le client grafeas indésirable.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- tooling
- Type d'issue
- Refactorisation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 35/100