Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement
NoteMetadata
protobuf message andNoteType
enum #338feat: Implement
NoteMetadata
protobuf message andNoteType
enum #338Changes from 8 commits
82b4284
99c102b
d4ec0f6
bdbc534
e8dfac2
821707a
8326fb8
f0a4a20
4a2dc53
31431a5
29e2112
afbebf8
af6caac
9ef0a86
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these values be aligned with values here. If so, I wonder if there is a good way to keep them consistent (maybe using enum here was not such a good idea?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not sure about this. There cannot be protobuf enums that don't start with 0 so it's either creating a phantom variant, creating a custom mapping function (from protobuf's note type to base note type), or just removing it altogether and using a
fixed32
. For making sure they stay synced I can add a test that asserts this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought it's not worth the added complexity if we can just convert the note type number. Removed in favor of a
fixed32
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed! I came to the same conclusion. The only question - should we use
int32
instead? (this way, encoding would take 1 byte instead of 4, but otherwise should be the same).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to
uint32
. Seemed similar in terms of encoding low values but marginally more correct for the use case.