Annotate JasperFx.Events Aggregation cluster for AOT (#262, slice 1/4)#264
Merged
Merged
Conversation
First of four slices that mirror the JasperFx-side cleanup pattern (#252-#255 + #260) on the JasperFx.Events side, tracked by #262. The aggregator graph (AggregateApplication and friends) reflects TAggregate / TProjection to discover Create/Apply/ShouldDelete handlers, builds delegates via Expression.Call + FastExpressionCompiler.CompileFast, and threads event types via IEvent<T>.MakeGenericType. Both aggregate and event types are preserved at the registered projection boundary (caller-side generic parameters that trimming sees). AOT consumers should rely on the source-generated evolver from JasperFx.Events.SourceGenerator per the AOT publishing guide. Apply class-level [UnconditionalSuppressMessage] with justifications: - Aggregation/AggregateApplication (primary partial — covers Register/ Creating/Applies/ShouldDelete): IL2026/IL2070/IL2072/IL2075/IL2077/ IL2087/IL2090/IL3050 - Aggregation/JasperFxAggregationProjectionBase: IL2065/IL2067/IL2070/ IL2072/IL2075/IL2090 - Aggregation/JasperFxMultiStreamProjectionBase: IL2026/IL2087 - Aggregation/CreateMethodCollection: IL2070/IL2072/IL3050 - Aggregation/ApplyMethodCollection: IL3050 - Aggregation/AggregateVersioning<T> + <T,TQuerySession>: IL2026/IL2090 240 → 130 unique IL warnings (-110) in JasperFx.Events.csproj. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 13, 2026
This was referenced May 13, 2026
Closed
Closed
thechucklingatom
pushed a commit
to thechucklingatom/jasperfx
that referenced
this pull request
May 19, 2026
…lice 2/4) Second slice in the JasperFx.Events AOT propagation cleanup (JasperFx#262), following the Aggregation slice (JasperFx#264). EventProjectionApplication and its supporting types (ProjectionGraph, JasperFxEventProjectionBase, CodeGenerationExtensions, ReflectionExtensions, ScopedAggregationWrapper, ProjectionStage, InvalidEventToStartAggregateException) reflect on projection / event types to build handler delegates via Expression trees + FastExpressionCompiler.CompileFast. The projection and event types are preserved at the registered projection boundary on the caller side. AOT consumers should rely on JasperFx.Events.SourceGenerator-emitted helpers per the AOT publishing guide. Apply class-level [UnconditionalSuppressMessage] with justifications: - Projections/EventProjectionApplication (outer + nested CreatorBuilder<T>): IL2026/IL2062/IL2072/IL2075/IL2087/IL3050 - Projections/ProjectionGraph: IL2072 - Projections/JasperFxEventProjectionBase: IL2075 - Projections/CodeGenerationExtensions: IL2067/IL2072 - Projections/ReflectionExtensions: IL2070 - Projections/ContainerScoped/ScopedAggregationWrapper: IL2087 - Projections/Composite/ProjectionStage: IL2026 (OptionsDescription diagnostic) - Projections/InvalidEventToStartAggregateException: IL3050 (error-message formatter on the exception path) 240 → 176 unique IL warnings (-64) in JasperFx.Events.csproj. 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
First of four slices that mirror the JasperFx-side cleanup pattern (#252-#255 + #260) on the JasperFx.Events side, tracked by #262.
The aggregator graph (
AggregateApplicationand friends) reflectsTAggregate/TProjectionto discover Create/Apply/ShouldDelete handlers, builds delegates viaExpression.Call+FastExpressionCompiler.CompileFast, and threads event types viaIEvent<T>.MakeGenericType. Both aggregate and event types are preserved at the registered projection boundary (caller-side generic parameters that trimming sees). AOT consumers should rely on the source-generated evolver fromJasperFx.Events.SourceGeneratorper the AOT publishing guide.Applied class-level
[UnconditionalSuppressMessage]:Aggregation/AggregateApplication(primary partial — covers Register/Creating/Applies/ShouldDelete)Aggregation/JasperFxAggregationProjectionBaseAggregation/JasperFxMultiStreamProjectionBaseAggregation/CreateMethodCollectionAggregation/ApplyMethodCollectionAggregation/AggregateVersioning<T>+<T,TQuerySession>Warning delta
JasperFx.Events.csprojIL warnings: 240 → 130 (-110).Slicing plan (from #262)
EventProjectionApplication.cs(~72 warnings)Test plan
dotnet build src/JasperFx.Events/JasperFx.Events.csproj -c Debug— 0 errors, -110 IL warningsdotnet build src/EventTests/EventTests.csproj -c Debug— 0 errorsRefs #262 #213
🤖 Generated with Claude Code