-
-
Notifications
You must be signed in to change notification settings - Fork 754
Avoid C#10 global using name collisions #1368
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
Avoid C#10 global using name collisions #1368
Conversation
|
I have a question.
The people who use not en-us culture Visual Studio must rewrite the generated code... |
AArnott
left a comment
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.
Thanks. I'm delighted that so few changes were necessary in the generated code templates to resolve the issue.
Background
MPC now allows C#10.
C#10 introduced
global using.Problem
It causes name collisions.
To avoid those collisions mpc generated code must not use
usingat all.Solution
Remove using directives from mpc templates.
Add new API byte[]? MessagePackReader.ReadByteArray()
The current behaviour is the above.
It uses
byte[] System.Buffers.BuffersExtensions.ToArray(ReadOnlySequence<byte>)extension method.It cannot handle
Nullable<ReadOnlySequence<byte>>well.