Migrate to Weasel.Core.BulkInsertMode (audit row weasel#264, Polecat side)#50
Merged
Merged
Conversation
This was referenced May 11, 2026
d115e4f to
9b4eb53
Compare
…efs to alpha (#264) Polecat-side adoption of the BulkInsertMode promotion to Weasel.Core in Weasel 9.0.0-alpha.1. See the canonical audit row: JasperFx/weasel#264 (parent JasperFx/jasperfx#218, pillar JasperFx/jasperfx#214). Mechanical migration -------------------- - src/Polecat/BulkInsertMode.cs deleted. Polecat's 3-value local enum (InsertsOnly, IgnoreDuplicates, OverwriteExisting) was a subset of Weasel's 4-value canonical enum; the missing fourth value (OverwriteIfVersionMatches) is now exposed. - src/Polecat/AdvancedOperations.cs picks up `using Weasel.Core;` and adds a switch case for OverwriteIfVersionMatches that throws NotSupportedException with a clear message pointing at #48. - Test files (bulk_insert_operations.cs, bulk_insert_edge_cases.cs) pick up `using Weasel.Core;`. Foundation bump --------------- - Directory.Packages.props: - JasperFx 1.31.0 → 2.0.0-alpha.1 - JasperFx.Events 1.36.0 → 2.0.0-alpha.1 - JasperFx.Events.SourceGenerator 1.4.0 → 2.0.0-alpha.1 - Weasel.SqlServer 8.14.1 → 9.0.0-alpha.1 - Weasel.EntityFrameworkCore 8.14.1 → 9.0.0-alpha.1 - Polecat's NaturalKeyProjection and FlatTableProjection ApplyAsync signatures widened to match JasperFx.Events 2.0's IInlineProjection.ApplyAsync (IReadOnlyList<StreamAction> → IEnumerable<StreamAction>). OverwriteIfVersionMatches behavior ---------------------------------- The actual implementation is tracked separately as #48 because it requires designing how the bulk-insert API exposes per-document expected-version metadata (Polecat doesn't have a version-discovery mechanism today). Until #48 lands, callers passing BulkInsertMode.OverwriteIfVersionMatches will get a clear NotSupportedException with a link to the issue. Breaking change for Polecat 4: third-party consumers of Polecat.BulkInsertMode by full name will see a compile-time break. To be flagged in the Polecat 4 migration guide (#46). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
9b4eb53 to
7ddc7a4
Compare
2 tasks
jeremydmiller
added a commit
that referenced
this pull request
May 11, 2026
Mirror the Marten 9 / Weasel 9 cutover pattern. - `3.0` maintenance branch set to V3.2.1 (the last 3.x release tag). All subsequent 3.x patches land on `3.0`. - `main` becomes the Polecat 4.0 development line. Existing 4.0-line work that already accumulated on main (PR #50 cutover-style package bumps to JasperFx 2.0/Weasel 9.0 alphas; PR #58 dedup adoption pass closing #52/#54/#55; PR #59 un-skipping the upstream-cache test on JasperFx 2.0.0-alpha.4) ships under the 4.0.0-alpha.1 label. Part of the Critter Stack 2026 release wave (JasperFx/jasperfx#217). Per-product master plan: #46. Polecat 4 + Marten 9 ship in lockstep.
jeremydmiller
added a commit
that referenced
this pull request
May 12, 2026
Closes #51. Bookkeeping tracker for the Polecat 4 migration narrative, filed as part of the Critter Stack 2026 release wave. ## What's covered - **Foundation pin bumps** — the JasperFx 1.x → 2.0 / JasperFx.Events 1.x → 2.0 / Weasel 8.x → 9.0 transitive bumps, with a before/after table. - **Dedup audit relocations** (jasperfx#218 / #224): - `Polecat.BulkInsertMode` → `Weasel.Core.BulkInsertMode` (PR #50, weasel#264) - `Polecat.Storage.CascadeAction` → `Weasel.Core.CascadeAction` (PR #47 / #61) - `Polecat.Metadata.ITenanted` now extends `JasperFx.MultiTenancy.IHasTenantId` (silent during Polecat 4 dev; documented for third-party consumers) - `Polecat.Exceptions.UnknownTenantException` → `JasperFx.MultiTenancy.UnknownTenantIdException` (with the new `TenantId` property surfaced) - **Event-sourcing API changes** — `IInlineProjection.ApplyAsync` widening to `IEnumerable<StreamAction>` (jasperfx-events#4306), plus the `IJasperFxAggregateGrouper.Group` `IReadOnlyList<IEvent>` tightening (jasperfx#201) flagged for the rare case a Polecat application implements a custom grouper. - **New behavior** — `BulkInsertWithVersionAsync` (#48 / #62, the optimistic-concurrency bulk-insert path), and the FlatTableProjection case-sensitivity fix (#49 / Weasel-side). - **AOT/codegen posture** — Polecat 4 is `PublishAot`-supported; `IsAotCompatible=true` lands with the per-project AOT audit (jasperfx#213). - **Dependency lockstep** — explicit pairing table; mixing major versions across products in this wave is unsupported. - **No obsolete API removals** — verified via grep; the audit row in #51 is closed as a no-op. ## Sidebar wiring Added a top-level "Migration Guide" entry under the existing sections in `docs/.vitepress/config.mts`, matching the same style other top-level docs use (Diagnostics, Schema). The page is reachable from any page in the sidebar tree.
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.
Summary
Polecat-side adoption of the BulkInsertMode promotion to Weasel.Core in Weasel 9.0.0-alpha.1. Audit row: JasperFx/weasel#264 (parent JasperFx/jasperfx#218, pillar JasperFx/jasperfx#214).
Mechanical migration
src/Polecat/BulkInsertMode.csdeleted. Polecat's 3-value local enum (InsertsOnly,IgnoreDuplicates,OverwriteExisting) was a subset of Weasel's 4-value canonical enum; the missing fourth (OverwriteIfVersionMatches) is now visible to consumers.src/Polecat/AdvancedOperations.cspicks upusing Weasel.Core;and adds a switch case forOverwriteIfVersionMatchesthat throwsNotSupportedExceptionwith a clear message linking to Implement BulkInsertMode.OverwriteIfVersionMatches #48.using Weasel.Core;.Foundation bump
Central package versions:
JasperFx.Events 2.0 widened
IInlineProjection.ApplyAsyncfromIReadOnlyList<StreamAction>toIEnumerable<StreamAction>— Polecat'sNaturalKeyProjectionandFlatTableProjectionsignatures updated to match.OverwriteIfVersionMatches behavior
The actual implementation is tracked separately as #48 because it requires designing how the bulk-insert API exposes per-document expected-version metadata (Polecat doesn't have a version-discovery mechanism today). Until #48 lands, callers passing
BulkInsertMode.OverwriteIfVersionMatcheswill get a clearNotSupportedExceptionwith a link to the issue.Breaking change (Polecat 4)
Third-party consumers of
Polecat.BulkInsertModeby full name will see a compile-time break. Will be flagged in the Polecat 4 migration guide (#46).Test plan
net9.0andnet10.0.InsertsOnly,IgnoreDuplicates,OverwriteExisting(3 of 4 modes).OverwriteIfVersionMatchestests land with the implementation in Implement BulkInsertMode.OverwriteIfVersionMatches #48.🤖 Generated with Claude Code