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
Add System.Half support for .NET 5.0 #1108
Conversation
Agreed. But sadly, I just tested it and |
Oh never mind. |
@neuecc I believe this PR should be changed to target |
@neuecc this PR is just a little too new for Hosted agents on Azure Pipelines, which have not yet been upgraded to VS 16.9. It only has 16.8 which does not support .NET 5.0. |
thank you for check it.
Yes, I wish I could, but vsix is an easy alternative because it requires a hack to get Analyzer to work in Unity csproj. |
...ssagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs
Show resolved
Hide resolved
...ssagePack.UnityClient/Assets/Scripts/MessagePack/Formatters/StandardClassLibraryFormatter.cs
Show resolved
Hide resolved
Since the half value is ushort, it is better to serialize the value as it is without converting it to a float. |
@crocuis While your suggested change results in a smaller msgpack stream, it lies about the type to do it. A message pack reader that is simply reading values as they are typed and displaying an object tree would then totally misrepresent the value. |
For this to work, since we now expose public API uniquely per framework, I had to split the PublicAPI files per framework as well.
Add HalfFormatter to BuiltinResolver.
net5.0
and use#if NET5_0
, NET5_0 must enable all NETCOREAPP2_1 optimization. Simplify #if netcoreapp filters #1107