-
-
Couldn't load subscription status.
- Fork 8
NativeAoT support #107
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
Open
Getup98
wants to merge
15
commits into
Delta3-Studio:master
Choose a base branch
from
Getup98:aot-annotations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
NativeAoT support #107
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
026cd71
Upgrade to .net9.0
Getup98 b75dd72
Backdash.Analyzers visual studio support by targeting .netstandard2.0
Getup98 84dfba4
Override Equals and GetHashCode on InlineArrays
Getup98 f301f16
NativeAot compatibility annotations and workarounds
Getup98 7a28e45
Enabled all SerializersTests even when AOT_ENABLED is true as they ar…
Getup98 11c8431
merge 'master' into 'aot-annotations'
Getup98 5fd5e29
NativeAot compatibility annotations and workarounds - For .net8.0
Getup98 1e56a4e
Downgrade to .net8.0
Getup98 c2b2a87
Downgrade to .net8.0 - set sdk version to 8.0.404 in global.json
Getup98 1ddb4a5
Fix IDE0040 in IsExternalInit
Getup98 477781c
merge 'master' into 'aot-annotations'
Getup98 51f8fe3
merge 'master' into 'aot-annotations',
Getup98 a6f987f
Fix SerializerTests
Getup98 6403753
Remove unnecessary Backdash.Analyzers reference from Backdash.csproj
Getup98 44eab4f
Repurpose AOT_ENABLED to enable PublishAoT, keeping IsAoTCompatible a…
Getup98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
benchmarks/Backdash.Benchmarks.Ping/Backdash.Benchmarks.Ping.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| /// <summary> | ||
| /// This is needed to make the analyzers work in .netstandard2.0 (so they are compatible with visual studio) | ||
| /// </summary> | ||
| static class IsExternalInit { } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
why
Interfaces? usually, the input type is a raw unmanaged structure.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.
In
BinarySerializerFactory.Getthere is a call totypeof(TInput).GetInterfaces(), which requires the annotation, and it bubbles up from there.The call is there to check whether the type can be serialized by an
IntegerBinarySerializer.I agree it makes little sense for the whole backend's input to be something serializable as an integer and it's for sure an edge case, but removing the edge case would lead to restricting functionality, which I'm not comfortable doing as my first PR to a repo.
Especially when you consider that the SpaceWar demo uses an enum as TInput, which is close enough to an integer for me to consider that edge case not so "edge" after all.
In theory when TInput is a raw unmanaged struct without any interfaces that annotation does nothing but clutter the source code a bit, no performance or trimmed size impact. (I say in theory because I have not personally tested it to be true, just relying on documentation)
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.
Now that I look at the latest changes, it seems like you removed
BinarySerializerFactory.Get, I'll update the branch and see if these annotations are at all necessary anymore.