googleapis / googleapis/google-cloud-cpp

Reconsider whether the lack/addition of an explicit optional keyword indicates a change in field type

Đang mở
#13,587 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
cpp: generator cpp: operator type: cleanup
Ngôn ngữ chính
C++
Star
659
Fork
462
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
89

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách đọc DiscoveryTypeVertex::GetFieldNumber và phần so sánh giữa tệp proto được tạo và discovery document. Kiểm tra cách các trường proto3 có và không có từ khóa optional được xử lý, đồng thời so sánh hành vi đó với has_presence. Hoàn tất khi các trường tương đương nhất quán sử dụng lại số trường hiện có khi phù hợp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
api
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.