google / google/protobuf.dart

proto3 'optional' keyword support

Open
#523 14 comments 38 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Currently `optional Timestamp` and `optional Duration` generate non-nullable types.
However proto3 'optional' keyword means nullable types.

Could be nice to fix this issue to be able to have nullable and non-nullable proto3 types processed correctly.

https://github.com/protocolbuffers/protobuf/issues/2168
https://github.com/protocolbuffers/protobuf/issues/8822

Thanks in advance

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by tracing how proto3 optional fields become Dart types, then read the linked protobuf issues for the intended semantics. Done means optional Timestamp and Duration fields generate nullable types while non-optional fields remain non-nullable, with coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.