-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add (experimental) native AOT support #8530
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
Conversation
@@ -36,6 +36,11 @@ protected override (string ResolvedUrl, string UrlTemplate, Dictionary<string, s | |||
[JsonConverter(typeof(SearchRequestOfTConverterFactory))] | |||
public partial class SearchRequest<TInferDocument> : SearchRequest | |||
{ | |||
static SearchRequest() | |||
{ | |||
DynamicallyAccessed.PublicConstructors(typeof(SearchRequestOfTConverter<TInferDocument>)); |
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.
We might have to generate this for all generic types that are using converter factories to make Activator.CreateInstance
succeed even when T
is a value type (e.g. if the user for some reason uses struct
for top level documents).
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.
LGTM, can't wait to give it a spin!
[JsonSerializable(typeof(ushort))] | ||
[JsonSerializable(typeof(ushort?))] | ||
[JsonSerializable(typeof(object))] | ||
[JsonSerializable(typeof(string))] |
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.
Suprised this is needed in the transport we do the following:
To get all the defaults attached to our JsonSerializerContext
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.
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.
Nullable value types don't work out of the box with the combined DefaultJsonTypeInfoResolver
. The other ones probably would work, but since this behavior is a bit of a blackbox to me, I rather define all these types explicitly.
As titled.