CenterEdge / Yardarm

OpenAPI 3 SDK Generator for C#
Apache License 2.0
44 stars 6 forks source link

Make output assemblies compatible with link-level trimming #158

Closed brantburnett closed 3 months ago

brantburnett commented 1 year ago

This will only work when using System.Text.Json with a JsonSerializerContext, but should be doable in that case. However, we have a lot of rework to do for compatibility.

There are also some optional components that could be implemented as well. These could improve trimming effectiveness.

brantburnett commented 3 months ago

At this time splitting the JsonSerializerContext may be a bridge too far. The implementation is internal so we can still come back and implement that in a future version.

This is particularly supported by this comment: https://github.com/dotnet/runtime/issues/101663#issuecomment-2107522551 which makes it appear that JsonSerializerContext may not be the long-term solution at all.