Skip to content

Annotate JasperFx.Events Projections cluster for AOT (#262, slice 2/4)#265

Merged
jeremydmiller merged 1 commit into
mainfrom
feature/aot-events-projection-262
May 13, 2026
Merged

Annotate JasperFx.Events Projections cluster for AOT (#262, slice 2/4)#265
jeremydmiller merged 1 commit into
mainfrom
feature/aot-events-projection-262

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

Second slice in the JasperFx.Events AOT propagation cleanup (#262), following the Aggregation slice (#264).

EventProjectionApplication and its supporting types 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.

Applied class-level [UnconditionalSuppressMessage]:

File Codes
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)

Warning delta

JasperFx.Events.csproj IL warnings on this branch: 240 → 176 (-64).

Slicing plan (from #262)

Test plan

  • `dotnet build src/JasperFx.Events/JasperFx.Events.csproj -c Debug` — 0 errors, -64 IL warnings
  • `dotnet build src/EventTests/EventTests.csproj -c Debug` — 0 errors
  • CI passes

Refs #262 #213

🤖 Generated with Claude Code

Second slice in the JasperFx.Events AOT propagation cleanup (#262), following
the Aggregation slice (#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) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant