Geometry: register the cache's CultRecordRef formatter with the MessagePack generator
The MessagePack source generator emitted a broken formatter reference for the CultRecordRef<T> reference members. Declaring CultRecordRefFormatter<> a known formatter makes the generated resolver defer to the cache's own. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0479304d0b
commit
ef8f76a0d4
2 changed files with 5 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ using GameCult.Caching;
|
|||
using MessagePack;
|
||||
using static GameCult.Geometry.CultGeometryDocuments;
|
||||
|
||||
// The generator emits a resolver for these [MessagePackObject] documents; without this it would try to
|
||||
// generate a formatter for the CultRecordRef<T> reference members instead of using the cache's.
|
||||
[assembly: MessagePackKnownFormatter(typeof(CultRecordRefFormatter<>))]
|
||||
|
||||
namespace GameCult.Geometry
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\packages\cultmath\src\CultMath\CultMath.csproj" />
|
||||
<ProjectReference Include="..\GameCult.Caching\GameCult.Caching.csproj" />
|
||||
<ProjectReference Include="..GameCult.Caching.MessagePackGameCult.Caching.MessagePack.csproj" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.7" />
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.10" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in a new issue