From 9ea134aca948ae864e51638526421caa966ee947 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 02:25:27 +0200 Subject: [PATCH] Geometry: name the cache formatter on each CultRecordRef member The MessagePack source generator cannot resolve CultRecordRef on its own and emitted a broken formatter reference; MessagePackKnownFormatter on the open generic did not change that. An explicit MessagePackFormatter per member is the same formatter the cache resolver uses, so the wire stays a key string. Co-Authored-By: Claude Sonnet 5.5 --- src/GameCult.Geometry/CultGeometryDocuments.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/GameCult.Geometry/CultGeometryDocuments.cs b/src/GameCult.Geometry/CultGeometryDocuments.cs index 5d9ddaa9..1ce73bdb 100644 --- a/src/GameCult.Geometry/CultGeometryDocuments.cs +++ b/src/GameCult.Geometry/CultGeometryDocuments.cs @@ -7,10 +7,6 @@ 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 reference members instead of using the cache's. -[assembly: MessagePackKnownFormatter(typeof(CultRecordRefFormatter<>))] - namespace GameCult.Geometry { /// @@ -157,6 +153,7 @@ namespace GameCult.Geometry public string RequestId { get; set; } = string.Empty; [Key(1)] + [MessagePackFormatter(typeof(CultRecordRefFormatter))] public CultRecordRef DomainKey { get; set; } [Key(2)] @@ -231,6 +228,7 @@ namespace GameCult.Geometry public string CutId { get; set; } = string.Empty; [Key(1)] + [MessagePackFormatter(typeof(CultRecordRefFormatter))] public CultRecordRef RequestKey { get; set; } [Key(2)] @@ -315,6 +313,7 @@ namespace GameCult.Geometry public string ChunkId { get; set; } = string.Empty; [Key(1)] + [MessagePackFormatter(typeof(CultRecordRefFormatter))] public CultRecordRef CutKey { get; set; } [Key(2)]