Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
neuecc merged 16 commits intomasterfromadopt-net9
Dec 11, 2024
Merged

Add .NET 9#2090

neuecc merged 16 commits intomasterfromadopt-net9
Dec 11, 2024

Conversation

@neuecc
Copy link
Member

@neueccneuecc commentedDec 9, 2024
edited
Loading

and more formatters for .NET 9.

  • Int128
  • UInt128
  • Rune
  • OrderedDictionary<T, V>
  • ReadOnlySet<T>

@AArnott
Copy link
Collaborator

Most of those types are in .NET 8, FYI.

@neuecc
Copy link
MemberAuthor

Yes, I thought I'd take this opportunity to add the things that hadn't been included.

@neuecc
Copy link
MemberAuthor

The addition of Int128 was discussed in#1740.
I've decided to useIBinaryInteger<>.TryWriteLittleEndian for writing.

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.
However, since having the result format itself change is not desirable, I opted to always serialize as binary.

commit:889dcc9 cc:@pCYSl5EDgo

@neuecc
Copy link
MemberAuthor

I usedMessagePackReader.ReadBytes this time.
Thinking about it again, APIs that forceReadOnlySequence are defective products that also have performance issues.
I'll make this APIObsolete soon.

@neueccneuecc marked this pull request as ready for reviewDecember 10, 2024 10:48
Comment on lines +82 to +87
#ifNET5_0_OR_GREATER
{typeof(IReadOnlySet<>),typeof(InterfaceReadOnlySetFormatter<>)},
#endif
#ifNET6_0_OR_GREATER
{typeof(PriorityQueue<,>),typeof(PriorityQueueFormatter<,>)},
#endif
Copy link
Collaborator

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 simplyif NET

Copy link
MemberAuthor

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.

Comment on lines 183 to +192
#ifNET5_0_OR_GREATER
{typeof(System.Half),HalfFormatter.Instance},
{typeof(System.Text.Rune),RuneFormatter.Instance},
#endif
#ifNET6_0_OR_GREATER
{typeof(DateOnly),DateOnlyFormatter.Instance},
{typeof(TimeOnly),TimeOnlyFormatter.Instance},
#endif
#ifNET7_0_OR_GREATER
{typeof(Int128),Int128Formatter.Instance},
Copy link
Collaborator

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

<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net472</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0;net9.0;net472</TargetFrameworks>
<LangVersion>13</LangVersion>
Copy link
Collaborator

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.

Copy link
MemberAuthor

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.

Copy link
Collaborator

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?

Copy link
MemberAuthor

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.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@AArnottAArnottAArnott approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@neuecc@AArnott

[8]ページ先頭

©2009-2025 Movatter.jp