googleapis / googleapis/google-cloud-cpp
Reconsider whether the lack/addition of an explicit optional keyword indicates a change in field type
- Langage dominant
- C++
- Étoiles
- 659
- Forks
- 462
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 89
Description
When comparing the current generation of a proto file to the discovery document being parsed, in `DiscoveryTypeVertex::GetFieldNumber` we interrogate the existence of the `optional` keyword in the .proto file as a criteria as to whether or not we can reuse the field number. As these proto files use proto3 syntax, this check may be superfluous and fields with and without the `optional` keyword may be equivalent. This issue was motivated by protobuf deprecating `has_optional_keyword` in favor of `has_presence`. `has_presence` treats the fields as equivalent.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par lire DiscoveryTypeVertex::GetFieldNumber et la comparaison entre le fichier proto généré et le document de découverte. Vérifiez comment sont traités les champs proto3 avec et sans le mot-clé optional, puis comparez ce comportement à has_presence. Le travail est terminé lorsque les champs équivalents réutilisent systématiquement le numéro de champ existant lorsque cela est approprié.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100