-
-
Notifications
You must be signed in to change notification settings - Fork 744
Add .NET 9 #2090
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 .NET 9 #2090
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest grouping all these under #if NET
src/MessagePack/MessagePack.csproj
Outdated
@@ -1,10 +1,11 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
|
|||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>