Skip to content

JasperFx 2.96.1: required members on a missing aggregate (jasperfx#1087) - #5779

Merged
jeremydmiller merged 1 commit into
masterfrom
bump-jasperfx-2.96.1
Oct 28, 2026
Merged

jeremydmiller merged 1 commit into
masterfrom
bump-jasperfx-2.96.1

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Moves the JasperFx family from 2.96.0 to 2.96.1. No Marten code change.

#1087 (JasperFx/jasperfx#1088, JasperFx/jasperfx#1090), in the aggregate source generator that Marten bundles into Marten.nupkg:

  • A missing aggregate is now built through its constructor (Activator.CreateInstance of a typeof literal, which is trim and AOT safe). Before this, the generator emitted new T { Required = default!, ... }. That overwrote initializers such as public required List<string> Emails { get; set; } = []; with null, so an Apply-only event on a new stream or multi-stream document threw. Marten 8's runtime codegen ran the constructor, so this restores the old behaviour.
  • A public parameterless constructor marked [SetsRequiredMembers] is now called directly as new T().
  • A Create that takes object, a supertype or an interface now owns the missing-aggregate case for the events it covers. Before, it failed to compile with CS8120.

This was validated before the release against a local pack of JasperFx. A new EventSourcingTests bug test passed: an issue-shaped multi-stream projection, a [SetsRequiredMembers] single-stream aggregate, and a Create(object) => null projection. The full EventSourcingTests suite was green apart from the five testing_projections tests that hard-code port 5432.

#1086 (Roslyn metadata-reference sharing) is in JasperFx.RuntimeCompiler, which this bump does not move.

WolverineFx 6.55.0, through WolverineFx.Bobcat, still resolves JasperFx.SourceGenerator 2.96.0 transitively in a few test and sample projects. That is unchanged from before this bump and harmless.

Locally: src/Marten.slnx Release build, 0 errors.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeremydmiller
jeremydmiller merged commit f7d8885 into master Oct 28, 2026
32 checks passed
@jeremydmiller
jeremydmiller deleted the bump-jasperfx-2.96.1 branch October 28, 2026 17:53
This was referenced Oct 29, 2026
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