-
Notifications
You must be signed in to change notification settings - Fork 321
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
Support dotnet trimming #1188
Comments
Inside of Microsoft, we currently don't need support for app trimming for those apps that use Bond. As such, we have no plans to implement this ourselves. Would you be interested in contributing this? |
Sure, why not! I’ve already looked at the code and I was wandering, why the projects are still targeting It might actually be more desirable to move to roslyn source generator to allow for scenarios without the reflection and dynamic generation that seems to be going on behind the scenes. This should not only improve (startup) performance but also fix this issue because there would be no dynamic elements that could be trimmed away. |
.NET 4.5 can be dropped and replaced with .NET 4.6.2. Support for reflection-based serialization can't be completely dropped. There are uses where the object to be serialized isn't known at compile time. So, I recommend splitting the trimming support from Roslyn-based source generation and tackling them on their own. Let's let this issue focus on trimming. |
Would it be okay to simply target |
Yes, solely targeting |
Issue
.NetCore introduced
App trimming
some time ago to reduce the size of published dotnet apps.As the c# bond implementation seems to rely on reflection, trimmed applications may break.
Proposal
static abstract
interface members + generics instead of reflection if possible (net7.0
+).This might increase (start-up) performance as well.
The text was updated successfully, but these errors were encountered: