Protobuf optional fields support
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 41
- Forks
- 22
- Avg merge
- 1h 48m
- Merged PRs (30d)
- 1
Description
Because we use custom headers for protobuf messages *.hpp instead of the ones generated by protoc i.e. *.pb.h, we are missing the functions has_<fieldname>() which allow you to check if an optional field was part of the message.
For our existing use cases, we can check against default value to see if an optional field was included in the message or not. There might be a problem if the default value is actually a valid value for that field...
It might be worth considering if we should add explicit support for checking if an optional field was part of a protobuf message.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the custom protobuf message headers (*.hpp) and compare them with protoc-generated *.pb.h files, focusing on the missing has_() behavior. Review how optional fields are currently represented and identify the message-generation or header entry point involved. Done should include an agreed scope for explicit optional-field presence checks and verification of the affected message use cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design, robotics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100