Skip to content

.Net: [MEVD] Stop using trimming-incompatible JSON serialization #11963

@roji

Description

@roji

MEVD provider implementations make frequent use of JsonSerializer.SerializeToNode() in various ways which are NativeAOT-incompatible. Examples include in mappers (e.g. in WeaviateDynamicMapper), when processing

To work on this, simply drop the following in a provider's csproj:

<IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible>

This will start generating NativeAOT- and trimming-related warnings. Once this is done, it should be possible to remove [RequiresUnreferenceCode] and [RequiresDynamicCode] from the provider's dynamic collection constructor and to build without any warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencemsft.ext.vectordataRelated to Microsoft.Extensions.VectorData

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions