Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There has been a push for using Source Generators to move stuff that relies on reflection to compile time code generation. JSON serialization is (mostly) supported in this mode with perf advantages as well.

This does not address pre-existing packages obviously. To make them work with AOT you might need to include an XML file (rd.xml) that indicates all the types that could be dynamically generated in your code. It is quite brittle and AFAIK everything might work until you get a runtime failure if something you did not include ends up being constructed.



And when stuff does inevitably break once deployed to production, it can be really difficult to pinpoint the reason why.

I've stopped using AOT, as IMO it's not (currently) suitable for complex, real-world apps - unless you are prepared for a lot of testing and pain.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: