-
Notifications
You must be signed in to change notification settings - Fork 150
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
System.Text.Json and Trimming #392
Comments
Hello @ColonelBundy,
Outside of test code, ClearScript currently uses Newtonsoft.Json only for the recently added
Please elaborate. What new capabilities will ClearScript need in order to support the scenario you're envisioning? Thanks! |
Yes I'm referrrning to the For trimming, this is what I'm referring to: https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming/prepare-libraries-for-trimming |
Hi @ColonelBundy,
We looked into
Certainly. To be honest, AOT is an area we've yet to investigate deeply. At first glance, it's difficult to see how ClearScript could be very functional in such an environment. Not only does it rely heavily on reflection and late binding, but it also enables calls into managed code from scripts – a source that's nowhere to be found at build time. We'll take a closer look. Thank you! |
I too would like if Clearscript supported trimming. :) |
Maybe EnableStringifyEnhancements feature should come with separate plugins (one for Newtonsoft, one for System.Text) |
Swapping out or providing the ability to swap Newtonsoft for System.Text.Json is highly desirable due to performance reasons.
The upcoming .Net 7 release and it's AOT mode is very attractive and to make this library compatible, we'd need proper annotations and configuration available to make this trimmer friendly.
Is there any plans to support the two use cases?
The text was updated successfully, but these errors were encountered: