Status: in-flight (alpha — JasperFx-side foundations largely shipped; [Obsolete] sweep continues per #273)
Target version: JasperFx 2.0
Milestone: 2.0
Part of [Master] Critter Stack 2026 (#217).
Pillars: cold-start (#212), AOT compliance (#213), dedupe Marten ↔ Polecat (#214).
JasperFx is the foundational layer of the Critter Stack — CLI framework, runtime/source-generator code generation, multi-tenancy primitives, descriptors, IoC conventions, and shared utilities. JasperFx 2.0 is the substrate that the rest of the 2026 wave (Marten 9, Wolverine 6, Polecat 4, CritterWatch 1.0, JasperFx.Events 2.0) builds against.
Goals for 2.0
- AOT-clean foundation. All JasperFx + JasperFx.Events public APIs either compile AOT-clean or carry precise
[RequiresDynamicCode] / [RequiresUnreferencedCode] annotations so downstream apps can publish with PublishAot=true.
- Roslyn becomes opt-in. Apps in
Static TypeLoadMode do not transitively reference Microsoft.CodeAnalysis.* in their production deployment. The JasperFx.RuntimeCompiler package is the explicit opt-in.
- Deterministic, byte-stable codegen.
dotnet run -- codegen write produces source files that are byte-identical to the in-memory output of Dynamic mode, so pre-generated code is a reliable build artifact.
- Breaking-change cleanup. Accumulated obsoletes and shape mismatches that have been waiting for a major version are removed in this wave.
Out of scope for JasperFx 2.0
- New unrelated features. 2.0 is a foundation release; greenfield features wait for 2.x.
- Native-AOT-publishing the Roslyn pipeline itself (the
AssemblyGenerator is dev-time only by design).
✅ Already shipped (2.0 branch)
Foundation cutover
Pillar work (see pillar issues for full detail)
What's left
Cold-start (#212)
Dedupe (#214) — JasperFx-side foundations
Breaking-change cleanup
Pre-existing 2.0 milestone issues — folded in here for tracking:
Documentation
Cross-product dependencies
- Marten 9 / Wolverine 6 / Polecat 4 / CritterWatch 1.0 all build against this. The shape of JasperFx 2.0's public API and AOT annotations needs to stabilize before downstream products can finalize their own AOT audits.
- JasperFx.Events 2.0 (separate master plan) ships in lockstep with JasperFx 2.0 — same package version line.
Linked implementation work
JasperFx is the foundational layer of the Critter Stack — CLI framework, runtime/source-generator code generation, multi-tenancy primitives, descriptors, IoC conventions, and shared utilities. JasperFx 2.0 is the substrate that the rest of the 2026 wave (Marten 9, Wolverine 6, Polecat 4, CritterWatch 1.0, JasperFx.Events 2.0) builds against.
Goals for 2.0
[RequiresDynamicCode]/[RequiresUnreferencedCode]annotations so downstream apps can publish withPublishAot=true.StaticTypeLoadModedo not transitively referenceMicrosoft.CodeAnalysis.*in their production deployment. TheJasperFx.RuntimeCompilerpackage is the explicit opt-in.dotnet run -- codegen writeproduces source files that are byte-identical to the in-memory output ofDynamicmode, so pre-generated code is a reliable build artifact.Out of scope for JasperFx 2.0
AssemblyGeneratoris dev-time only by design).✅ Already shipped (2.0 branch)
Foundation cutover
1.0maintenance branch frozen at the last 1.x main commit2.0becomes the newmain; all packages versioned2.0.0-alpha.1JasperFx,JasperFx.Events,JasperFx.Events.SourceGenerator,JasperFx.SourceGeneration,JasperFx.SourceGeneratorJasperFx.RuntimeCompilerintentionally left at4.5.0until its own next versionnet9.0;net10.0.net11.0will be added when the runtime ships.ActivityExtensions.AddExceptionpolyfill removed; obsoleteNET8_0_OR_GREATER#ifblocks inlined.Pillar work (see pillar issues for full detail)
ITypeLoaderabstraction (Static / Dynamic / Auto loaders), JasperFx.RuntimeCompiler package split,services.AddRuntimeCompilation()is the single opt-in seam. Cold-start ([Pillar] Cold-start performance #212) + AOT ([Pillar] AOT compliance #213).CloseAndBuildAs<T>carries[RequiresDynamicCode]/[RequiresUnreferencedCode]. NewGenericFactoryCacheprovides delegate-cached, AOT-friendly hot-path generic instantiation. AOT ([Pillar] AOT compliance #213) + cold-start ([Pillar] Cold-start performance #212).AllInjectedFields/Settersby stable, process-independent keys). Prerequisite for byte-stable pre-generated source. Cold-start ([Pillar] Cold-start performance #212).What's left
Cold-start (#212)
MakeGenericType/Activator.CreateInstanceand migrate toGenericFactoryCacheor source-generator equivalents.dotnet run -- codegen writeproduces byte-identical output toStaticmode reads — investigate residual asymmetry around namespace ordering and TFM-conditional emit.AOT (#213)
IsAotCompatible=trueonJasperFx.csprojandJasperFx.Events.csprojso the AOT analyzer runs in our own CI.MakeGenericType/Activator.CreateInstance/Type.GetMethod(...).Invokein JasperFx + JasperFx.Events; annotate or migrate.JasperFx.CommandLine(assembly scanning forIJasperFxCommand) — annotate or replace with the existing source generator.Staticmode withIsAotCompatible=true. Build fails on any IL2026/IL3050 warning.Dedupe (#214) — JasperFx-side foundations
JasperFx.EventsAPI surface review: confirm the abstractions Marten + Polecat both consume are stable enough to be the canonical home. (Detailed in the JasperFx.Events 2.0 master plan.)Breaking-change cleanup
Pre-existing 2.0 milestone issues — folded in here for tracking:
IAggregateGrouper.Group: changeIEnumerable<IEvent>→IReadOnlyList<IEvent>. Breaking signature.OptionsDescription.Children+Setsaren't being serialized — public fields, not properties.[Obsolete]APIs and remove the ones that have been deprecated since the previous major. (Tracked in [Obsolete] sweep — coordinated removals across the Critter Stack 2026 wave #273 — safe removals shipped via PRs 2.0 cleanup sweep — [Obsolete] removals + TPL Dataflow removal from JasperFx #272, Reclassify perf-nag [Obsolete] + remove dead ShardStateTracker.Publish (#273) #277, Remove no-consumer OaktonAsyncCommand / OaktonCommand shims (#273) #278; remaining steps need coordinated Marten / Polecat / Wolverine sample updates.)Documentation
AddRuntimeCompilation, code pre-generated viacodegen write).docs/migration-guide.md.)Cross-product dependencies
Linked implementation work