LanguageServer.Framework icon indicating copy to clipboard operation
LanguageServer.Framework copied to clipboard

Source generators usage to remove trim warnings

Open Pixel-Tony opened this issue 5 months ago • 2 comments

I am not sure why, but I receive trim warning when trying to build AOT with the framework. It seems that they are generated due to using json serializers, and the intended way is to use source generators for that.

Do You think that it is viable to switch to source generator syntax for serializers (it should be an easy task, a matter of one annotated partial method per class) to remove the warnings?

Pixel-Tony avatar Jul 23 '25 21:07 Pixel-Tony

I remember I used source generation, and I disabled the reflection approach.

CppCXY avatar Jul 28 '25 09:07 CppCXY

I think some classes can be serialized as it is, but for some of the other (mostly ...Params family) it still suggests that You use explicit attribute usage. I will try to look around and see if specific issues can be fixed with that.

Pixel-Tony avatar Jul 29 '25 09:07 Pixel-Tony