googleapis / googleapis/google-cloud-cpp
Reconsider whether the lack/addition of an explicit optional keyword indicates a change in field type
- 主要语言
- C++
- 星标
- 659
- 派生
- 462
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 89
描述
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.
贡献指南
调研方向
首先阅读 DiscoveryTypeVertex::GetFieldNumber,以及生成的 proto 文件与 discovery document 之间的比较。检查带有和不带有 optional 关键字的 proto3 字段是如何处理的,并将该行为与 has_presence 进行比较。当等效字段在适当情况下始终复用现有字段编号时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cpp
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100