Annotate operations / sessions / EventGraph for AOT (slice 6)#85
Merged
Conversation
Sixth slice in Polecat's AOT-pillar (jasperfx#213) cleanup, following the Patching slice (#79). The session + event-operations layer threads document and event types through ISerializer (ToJson/FromJson), the JasperFx.Events event-registry infrastructure (Event<T>.MakeGenericType + aggregator-source factories), and JasperFx natural-key reflection. Document and event types are preserved by registration on the caller side (Schema.For<T>() / StoreOptions.Events.AddEventType / projection registration) per the AOT publishing guide. AOT consumers supply a source-generator-backed ISerializer impl. Apply class-level [UnconditionalSuppressMessage] with justifications: - Events/EventOperations: IL2026/IL2090/IL3050 (serializer + JasperFx.Events generic factories + FindNaturalKeyDefinition<T> property reflection) - Internal/QuerySession (all partials): IL2026/IL3050 (load/query through ISerializer.FromJson) - Internal/DocumentSessionBase: IL2026/IL3050 (store/update/delete through ISerializer.ToJson + inline projection runners) - AdvancedOperations: IL2026/IL3050 (BulkInsertAsync / BulkInsertWithVersionAsync via ISerializer.ToJson) - Events/EventGraph: IL2026/IL2057/IL3050 (EventRegistry extension, dynamic aggregate-type resolution by .NET type name as a fallback, Type.MakeGenericType for aggregator-source factories) - Events/EventGraph.PolecatEventType: IL3050 (Wrap uses Event<T>.MakeGenericType for envelope construction) 194 → 88 unique IL warnings on this branch (-106 cumulative with #79's -42; this slice alone accounts for -64). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
jeremydmiller
added a commit
that referenced
this pull request
May 13, 2026
Final slice in Polecat's AOT-pillar (jasperfx#213) cleanup, following the Patching slice (#79) and Operations/Sessions slice (#85). Annotates the remaining reflective surfaces across projection storage, batching, result readers, the LINQ parser pipeline, IoC service-collection extensions, and flat-table projection helpers. Apply class-level [UnconditionalSuppressMessage] with justifications: Serializer consumers (IL2026 + IL3050): - Projections/PolecatProjectionStorage - Internal/Batching/QueryBatchItem (QueryListBatchItem + QueryFirstOrDefaultBatchItem) - Internal/Batching/LoadBatchQueryItem - Internal/Batching/LoadManyBatchQueryItem - Internal/AdvancedSqlResultReader (JsonReader + DocumentReader) - Events/Internal/PcEventsRowReader - Events/Linq/EventListHandler - Events/Daemon/PolecatEventLoader - Linq/QueryHandlers/GroupByListHandler - Events/Protected/StreamCompacting.StreamCompactingRequest<T> JasperFx.Events projection registration (IL2026 + IL3050): - Projections/PolecatProjectionOptions - Projections/PolecatCompositeProjection Expression.Lambda / Type.MakeGenericType (IL3050 only): - Projections/Flattened/StatementMap<TEvent> - Projections/Flattened/EventDeleter<TEvent> - Linq/Parsing/WhereClauseParser - Linq/Parsing/LinqQueryParser - Linq/Parsing/GroupBySelectBuilder - Linq/Joins/JoinResultSelectorRewriter - Events/Operations/EventWhereClauseParser IoC type-argument flow: - PolecatStoreServiceCollectionExtensions: IL2091 (M.E.DI registration of T) - PolecatConfigurationExpression: IL2087 (fluent generic flow) 194 → 106 unique IL warnings on this branch (-88). Combined with the open slice 5 (#79, -42) and slice 6 (#85, -64), Polecat.csproj will be at or near 0 IL warnings once all three merge. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Sixth slice in Polecat's AOT-pillar (jasperfx#213) cleanup, following the Patching slice (#79).
The session + event-operations layer threads document and event types through
ISerializer(ToJson/FromJson), the JasperFx.Events event-registry infrastructure (Event<T>.MakeGenericType+ aggregator-source factories), and JasperFx natural-key reflection. Document and event types are preserved by registration on the caller side (Schema.For<T>()/StoreOptions.Events.AddEventType/ projection registration) per the AOT publishing guide. AOT consumers supply a source-generator-backedISerializerimpl.Applied class-level
[UnconditionalSuppressMessage]:Events/EventOperationsFindNaturalKeyDefinition<T>property reflection)Internal/QuerySession(all partials)ISerializer.FromJson)Internal/DocumentSessionBaseISerializer.ToJson+ inline projection runners)AdvancedOperationsBulkInsertAsync/BulkInsertWithVersionAsyncviaISerializer.ToJson)Events/EventGraphEventRegistryextension, dynamic aggregate-type resolution by .NET type name as a fallback,Type.MakeGenericTypefor aggregator-source factories)Events/EventGraph.PolecatEventTypeWrapusesEvent<T>.MakeGenericTypefor envelope construction)Warning delta
`Polecat.csproj` IL warnings on this branch: 194 → 88 (-106 cumulative with #79's -42; this slice alone -64).
Test plan
Stacks on #79 (Patching slice).