mafintosh / mafintosh/protocol-buffers
Handling of default values
- Dominant language
- JavaScript
- Stars
- 760
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
@mafintosh is there a reason you are initializing all optional fields with a default value, even if they are not found in the buffer? This is complicating parsing of the optional values, because the values we get back could indicate they were missing from the buffer (e.g., empty string) or they could be present and perfectly valid.
Would you be open to a PR removing the code setting the defaults for optional fields?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the parser code that initializes optional fields with default values, then trace how fields absent from the buffer are returned. Confirm the behavior for missing versus present empty values. Done means optional fields no longer receive ambiguous defaults and existing parsing behavior remains covered by the relevant tests, if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100