Conversation
|
Most of those types are in .NET 8, FYI. |
|
Yes, I thought I'd take this opportunity to add the things that hadn't been included. |
|
The addition of Int128 was discussed in #1740. When it comes to serialization methods, one could consider a pattern where numbers within the long range are serialized as Integers, while anything beyond that is serialized as binary. commit: 889dcc9 cc: @pCYSl5EDgo |
|
I used |
| #if NET5_0_OR_GREATER | ||
| { typeof(IReadOnlySet<>), typeof(InterfaceReadOnlySetFormatter<>) }, | ||
| #endif | ||
| #if NET6_0_OR_GREATER | ||
| { typeof(PriorityQueue<,>), typeof(PriorityQueueFormatter<,>) }, | ||
| #endif |
There was a problem hiding this comment.
IMO you can just group both of these under #if NET because 5 and 6 are not supported any more, so anything in .NET 8 can be simply if NET
There was a problem hiding this comment.
That's true.
However, it's not a bad thing to have a clear time for adding it.
Also, I don't think they'll integrate it every time they turn off support, so I'll leave it as it is.
| #if NET5_0_OR_GREATER | ||
| { typeof(System.Half), HalfFormatter.Instance }, | ||
| { typeof(System.Text.Rune), RuneFormatter.Instance }, | ||
| #endif | ||
| #if NET6_0_OR_GREATER | ||
| { typeof(DateOnly), DateOnlyFormatter.Instance }, | ||
| { typeof(TimeOnly), TimeOnlyFormatter.Instance }, | ||
| #endif | ||
| #if NET7_0_OR_GREATER | ||
| { typeof(Int128), Int128Formatter.Instance }, |
There was a problem hiding this comment.
I suggest grouping all these under #if NET
src/MessagePack/MessagePack.csproj
Outdated
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net472</TargetFrameworks> | ||
| <TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0;net472</TargetFrameworks> | ||
| <LangVersion>13</LangVersion> |
There was a problem hiding this comment.
Consider changing this in the repo root Directory.Build.targets instead of here so you get C# 13 in more projects.
There was a problem hiding this comment.
Root settings do affect Unity (creating situations where something works in Visual Studio but not in Unity).
I was surprised that CentralPackageTransitivePinningEnabled also affected Analyzers and broke the environment.
The recent increase in implicit insertions and high rate of problems is getting a bit tiresome.
Of course, many things have become more convenient.
That said, yes, let's move the LangVersion specification to Directory.Build.targets.
There was a problem hiding this comment.
The recent increase in implicit insertions and high rate of problems is getting a bit tiresome.
Do you want to elaborate on this? What are these implicit insertions you speak of?
There was a problem hiding this comment.
I am saying that there are increasing cases that cannot be solved by looking at the csproj file alone.
Configuration settings are being inserted from various places.
and more formatters for .NET 9.
OrderedDictionary<T, V>ReadOnlySet<T>