feat: Pass in serializer options to be AOT compliant#351
feat: Pass in serializer options to be AOT compliant#351copybara-service[bot] wants to merge 1 commit into
Conversation
7dc7a81 to
3f856e0
Compare
|
@tarekgh could you take a look at this PR to see if it includes the right changes to the auto-generated files for AOT compliance? It seems like I'd need to re-record all of the tests because we're passing in the serializer options for all the http calls, so that will take some additional time on my end. |
|
Thanks for putting this together! Passing explicit, source-generated serializer options through these call sites is a great step in the right direction, and the 1. The shared options still chain a reflection-based resolver In options.TypeInfoResolverChain.Insert(0, GenAIJsonContext.Default);
options.TypeInfoResolverChain.Add(new DefaultJsonTypeInfoResolver());
2. A couple of call sites still use the reflection default options These two were not updated and still rely on
3. Polymorphic
funcResponse.Response = new() { ["result"] = functionResultContent.Result };When the graph is serialized, 4. There is currently no AOT/trim enforcement in the build
Summary: items 1, 2, and 4 feel like must-haves before we can call the library fully AOT compatible, and item 3 is the trickier piece because of the open-ended |
PiperOrigin-RevId: 927504092
3f856e0 to
6ab5207
Compare
feat: Pass in serializer options to be AOT compliant