-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve MessagePack model #618
Conversation
I have currently held back from changing the integer types. |
Scala 3 lacks bit literals
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.
Looks good to me, let's see if @ybasket has some comments.
No, was only waiting for the small fix you had requested. LGTM |
Current implementation of the MessagePack model allows for creation of malformed objects as the
ByteVector
class (which underlays most of the types in the model) has a maximum length ofLong.MaxValue
bytes which is bigger than the specification defines for some types.This PR proposes following changes:
Float32(ByteVector)
->Float32(Float)
Float64(ByteVector)
->Float64(Double)
Timestamp32(ByteVector)
->Timestamp64(Int)
Timestamp64(ByteVector, ByteVector)
->Timestamp64(Long)
withnanoseconds
andseconds
fieldsTimestamp96(ByteVector, ByteVector)
->Timestamp96(Int, Long)
Ref. #603