Repository navigation
GH-5089 Event Model: match the EmittedEvents manifest to a handler overload by its ParameterTypes - #5100
Merged
Conversation
…erload by its ParameterTypes The JasperFx.Events source generator now writes one [assembly: EmittedEvents] entry per Handle overload, told apart by ParameterTypes (#1021 / #1030, JasperFx 2.91.0). EventModelRoles keyed the manifest by (HandlerType, MethodName) only, so every overload of one handler class got the union of all the overloads' events. An entry now applies to a MethodCall when its ParameterTypes sequence-equal the method's parameter types. Only when there are none do the entries without ParameterTypes apply: older manifests, and overloads the generator could not name from assembly scope. JasperFx / JasperFx.Events / SourceGenerators / InMemory 2.90.2 -> 2.91.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
This was referenced Oct 21, 2026
This was referenced Nov 1, 2026
This was referenced Nov 9, 2026
This was referenced Nov 16, 2026
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.
Wolverine side of JasperFx/jasperfx#1021, which JasperFx/jasperfx#1030 fixed and JasperFx 2.91.0 ships.
Problem
EventModelRoles.emittedFromSourcekeyed the source generator's[assembly: EmittedEvents(...)]manifest by(HandlerType, MethodName). EveryHandleoverload of one handler class got the union of all the overloads' events. Stoat'sClaimHandler,GateHandlerand similar classes showed every command slice claiming events it never appends.Fix
MethodCallwhen itsParameterTypessequence-equal the method's parameter types.ParameterTypesapply. Those come from older manifests, and from overloads whose parameter types the generator could not name at assembly scope.Tests
CoreTests
emitted_events_from_the_source_generators_manifest_4914gains three cases on a three-overload handler: each typed overload gets only its own events, and an overload with no typed entry falls back to the name-only entry.EventModelpass.dotnet build wolverine.slnx -c Release -f net9.0has 0 errors.Closes #5089
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U