Skip to content

Update MessagePack version #47790

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

Merged
merged 4 commits into from
Apr 25, 2023
Merged

Update MessagePack version #47790

merged 4 commits into from
Apr 25, 2023

Conversation

BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Apr 19, 2023

Closes #46787

The update included nullable annotations in the msgpack library.

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Apr 19, 2023
@BrennanConroy BrennanConroy requested review from halter73, a team and wtgodbe as code owners April 19, 2023 19:56
@@ -79,8 +79,12 @@ private HubMessage CreateInvocationMessage(ref MessagePackReader reader, IInvoca
}

var target = ReadString(ref reader, binder, "target");
if (string.IsNullOrEmpty(target))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a bug fix?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, it would have thrown later at the binder.GetParameterTypes(target) call, which would result in slightly different exception behavior. This just provides a more accurate exception message.

@@ -79,8 +79,12 @@ private HubMessage CreateInvocationMessage(ref MessagePackReader reader, IInvoca
}

var target = ReadString(ref reader, binder, "target");
if (string.IsNullOrEmpty(target))
{
throw new InvalidDataException("Null or empty target for Invocation message.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to indicate whether it was null or empty? Also, is empty actually possible or will it always end up null if it's missing?

Copy link
Member Author

@BrennanConroy BrennanConroy Apr 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both should be possible (I explicitly added empty string tests for all these new exceptions). And when I say should, it's only possible if someone manually tries to implement the protocol and gets it wrong. Which is why I don't think it's important to distinguish between them.

@BrennanConroy BrennanConroy enabled auto-merge (squash) April 25, 2023 20:15
@BrennanConroy BrennanConroy merged commit 3bdb2c1 into main Apr 25, 2023
@BrennanConroy BrennanConroy deleted the brecon/msgpackversion branch April 25, 2023 20:52
@ghost ghost added this to the 8.0-preview4 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MessagePack deserialization throws error when using Lz4BlockArray compression
3 participants