Repository navigation
Say so when a pinned generator loses to a bundled copy and none reaches the compiler (#1138) - #1139
Merged
Merged
Conversation
…es the compiler (#1138) The .NET SDK's package file conflict resolution keeps only the higher assembly version of two analyzers with one file name. A JasperFx.Events.SourceGenerator pinned at 2.100.0 beside Polecat 5.49.0 (bundling 2.100.1) was dropped there, and a project target that removes the store's bundled copy then removed the only copy left: nothing generated and the build passed. JasperFx.Events' buildTransitive targets now warn JFXEVT1138 after CoreCompile when the SDK dropped a copy of the generator and no copy reached the compiler, naming the dropped copy and the runtime's version. The run-time "left no trace" message names the pin as a cause too. Fixes #1138 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jeremydmiller
force-pushed
the
generator-runtime-version-1138
branch
from
November 8, 2026 16:50
c58062b to
190c3f2
Compare
This was referenced Nov 9, 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.
What was wrong
It was not the generator. A
JasperFx.Events.SourceGeneratorat another version than theJasperFx.Eventsruntime generates normally on its own: 2.100.0 against a 2.100.1 runtime emits the evolver and the marker.The cause, reproduced with Polecat 5.49.0 and a direct
JasperFx.Events.SourceGenerator2.100.0 (Wolverine'sPolecatTestsshape):_HandlePackageFileConflicts) sees two analyzers namedJasperFx.Events.SourceGenerator.dlland keeps only the higher assembly version.-v:diagshows it: "Choosing 'Analyzer:polecat/5.49.0/…' because AssemblyVersion '2.100.1.0' is greater than '2.100.0.0'".DropDuplicateBundledEventSourceGeneratordrops the copy under/polecat/. It was written for the equal-version case, where both copies survive to that point.No source-generated dispatcher foundat run time.At equal versions the SDK cannot pick a winner, both copies survive, and the project target or JasperFx's own dedupe (#891) leaves one. That is why pinning everything to 2.100.1 fixed wolverine#5394.
What changed
JFXEVT1138, a build-time warning inbuildTransitive/JasperFx.Events.targets._ConflictPackageFiles) and no copy reached the compiler.JasperFx.Eventsruntime.AfterTargets="CoreCompile", so it reads exactly what the compiler was given, whatever order theBeforeTargetshooks ran in.JasperFxEventsReportLostSourceGenerator=false.How it was tested
SmokeTestBuildTargetshas four new arrangements, 10 in all, and passes. The refused answer isa_generator_at_another_version_never_produces_nothing_without_saying_so. The other three are a dropped lower copy with the higher copy compiled, no generator anywhere, and the opt-out.SourceGeneratorMarkerTests.an_unconfirmed_assembly_names_a_generator_pinned_to_another_version_than_the_runtime. All 1,832 EventTests pass.Not done
DropDuplicateBundledEventSourceGeneratorinPolecatTests(and any copies of it) can be deleted, since JasperFx.Events has deduped equal copies since Two copies of the analyzer generate identical file paths, so file-scoped evolvers collide with CS0433 #891.Fixes #1138
🤖 Generated with Claude Code