Status: in-flight (foundation + AOT + intra-Weasel dedupe done; cross-product dedupe rows + hot-path migration pending)
Target version: Weasel 9.0
Milestone: 9.0
Part of [Master] Critter Stack 2026 (JasperFx/jasperfx#217).
Pillars: cold-start (JasperFx/jasperfx#212), AOT compliance (JasperFx/jasperfx#213), dedupe Marten ↔ Polecat (JasperFx/jasperfx#214).
Weasel is the database-manipulation substrate of the Critter Stack — schema migrations, DDL diffing, command-execution primitives. Per pillar #214 Rule 2: anything that touches databases and is currently duplicated between Marten and Polecat lands here. Weasel 9.0's job is to be the canonical home for that surface so Marten 9 and Polecat 4 stop carrying parallel copies.
This is a foundation release. Greenfield Weasel features wait for 9.x.
Goals for 9.0
- Canonical home for database-manipulation logic shared by Marten and Polecat. No piece of DDL/migration/storage logic exists in both products with non-trivial divergence.
- AOT-clean.
IsAotCompatible=true on Weasel.Core (and the database-specific Weasel.* projects where feasible); reflective surfaces annotated.
- Cold-start friendly. Audit per-call generic instantiation and reflective discovery in command-building / DDL-diff hot paths.
- Build against JasperFx 2.0. Same TFM list (
net9.0;net10.0), same IsAotCompatible posture.
Out of scope for Weasel 9.0
- New database backends. Existing backends (Postgres, SQL Server, Oracle, MySQL, SQLite, EF Core adapter) are kept; new ones wait for 9.x.
- Migrating logic into Weasel that doesn't touch databases (those go to JasperFx.Events per Rule 1).
✅ Already shipped
Weasel is on the 9.0.0-alpha.5 line. Foundation work, AOT readiness, and the intra-Weasel consolidation pass are complete; what remains is cross-product dedupe row migrations and the hot-path GenericFactoryCache pass.
What's left
Dedupe (JasperFx/jasperfx#214) — Weasel as canonical home for database concerns
Per pillar #214 Rule 2, the following are scoped to land or be confirmed here. The actual content is iterative — items move from Marten → Weasel.Core → Polecat as the audit deliverable runs, rather than being a fixed up-front list.
Intra-Weasel duplication (5-provider audit)
A separate axis from the Marten ↔ Polecat dedupe pillar above: inside Weasel itself, the 5 database-provider projects (PostgreSQL, SQL Server, Oracle, MySQL, SQLite) re-implement Table, TableColumn, IndexDefinition, ForeignKey, TableDelta, Migrator, Sequence, Function, and View side-by-side with ~85% structural overlap. The fluent API for configuring tables has also drifted (the same identity-column concept is spelled Serial() / AutoNumber() / AutoIncrement() depending on the provider). 9.0 is the only window where we can fix these breaking-change-style.
Foundation work
Existing open issues to land in 9.0 (initial sweep — not exhaustive)
Cross-product dependencies
Open design questions
- Does Weasel 9.0 ship before Marten 9 / Polecat 4 (as the substrate they consume), or does the iterative dedupe pass mean Weasel cuts an alpha → Marten 9 alpha consumes it → Weasel finalizes → Marten / Polecat ship together? Lean toward the latter — Weasel's stability is gated on the downstream consumers validating each migrated row.
Explicitly out of scope for Weasel 9.0
- Adding logic that has nothing to do with databases. That belongs in
JasperFx.Events per Rule 1.
Linked implementation work
Weasel is the database-manipulation substrate of the Critter Stack — schema migrations, DDL diffing, command-execution primitives. Per pillar #214 Rule 2: anything that touches databases and is currently duplicated between Marten and Polecat lands here. Weasel 9.0's job is to be the canonical home for that surface so Marten 9 and Polecat 4 stop carrying parallel copies.
This is a foundation release. Greenfield Weasel features wait for 9.x.
Goals for 9.0
IsAotCompatible=trueonWeasel.Core(and the database-specific Weasel.* projects where feasible); reflective surfaces annotated.net9.0;net10.0), sameIsAotCompatibleposture.Out of scope for Weasel 9.0
✅ Already shipped
Weasel is on the
9.0.0-alpha.5line. Foundation work, AOT readiness, and the intra-Weasel consolidation pass are complete; what remains is cross-product dedupe row migrations and the hot-pathGenericFactoryCachepass.What's left
Dedupe (JasperFx/jasperfx#214) — Weasel as canonical home for database concerns
Per pillar #214 Rule 2, the following are scoped to land or be confirmed here. The actual content is iterative — items move from Marten → Weasel.Core → Polecat as the audit deliverable runs, rather than being a fixed up-front list.
IStorageOperationmigration — explicit example from the pillar. Move from Marten toWeasel.Core; verify Marten 9 and Polecat 4 both build against the consolidated abstraction. First concrete row of the audit.Intra-Weasel duplication (5-provider audit)
A separate axis from the Marten ↔ Polecat dedupe pillar above: inside Weasel itself, the 5 database-provider projects (PostgreSQL, SQL Server, Oracle, MySQL, SQLite) re-implement
Table,TableColumn,IndexDefinition,ForeignKey,TableDelta,Migrator,Sequence,Function, andViewside-by-side with ~85% structural overlap. The fluent API for configuring tables has also drifted (the same identity-column concept is spelledSerial()/AutoNumber()/AutoIncrement()depending on the provider). 9.0 is the only window where we can fix these breaking-change-style.SchemaObjectBase,TableBase,IDdlSyntaxStrategy, unifiedColumnExpression,ForeignKeyBaseenhancement). Estimated ~2,100–2,500 LOC of duplication removable.AOT (JasperFx/jasperfx#213)
IsAotCompatible=trueonWeasel.Core.csprojonce the project builds against JasperFx 2.0 + JasperFx.Events 2.0.Weasel.Core(DDL builders, command construction, type/column mapping) — annotate or migrate. (Weasel.Corereflective surface verified clean; PR weasel#263: Add Weasel.Core.AotSmoke + per-provider IsAotCompatible audit #283 smoke-test now gates regressions.)5844c9f— addedWeasel.Core.AotSmoke+ per-provider audit table.)Cold-start (JasperFx/jasperfx#212)
MakeGenericType/Activator.CreateInstancein DDL-build and command-construction hot paths; migrate toGenericFactoryCacheor source-generator equivalents where the call site has a hot path.Foundation work
JasperFx 2.0+JasperFx.Events 2.0(lockstep). (Directory.Packages.props: JasperFx 2.0.0-alpha.11, JasperFx.Events 2.0.0-alpha.4 — both on the 2.0 alpha line.)net8.0(if present in any sub-project), confirmnet9.0;net10.0across the solution. Will addnet11.0when JasperFx does. (All packaged Weasel.* projects onnet9.0;net10.0.)9.0.0-alpha.1on all packaged Weasel.* projects. (Currently on9.0.0-alpha.5per4b79da4.)docs/migration-guide.md— PR Add Weasel 8 → 9 migration guide #276 / commitdd1c81a.)Existing open issues to land in 9.0 (initial sweep — not exhaustive)
CascadeActionobsolete. Removal candidate for the major.Cross-product dependencies
CreationStylewith change made in version 8.5.0 #214.Open design questions
Explicitly out of scope for Weasel 9.0
JasperFx.Eventsper Rule 1.Linked implementation work