Skip to content

Adopt JasperFx 2.0 alpha.16/.15/.8 + migrate consumer renames (#4484)#4488

Merged
jeremydmiller merged 1 commit into
masterfrom
feat/4484-obsolete-sweep
May 19, 2026
Merged

Adopt JasperFx 2.0 alpha.16/.15/.8 + migrate consumer renames (#4484)#4488
jeremydmiller merged 1 commit into
masterfrom
feat/4484-obsolete-sweep

Conversation

@jeremydmiller
Copy link
Copy Markdown
Member

Summary

Closes #4484. Adopts the new JasperFx wave that finishes the 2.0 [Obsolete] sweep removals (JasperFx PR #307 / #273) and migrates Marten's consumer code over the few renames that surface.

Pin bump

Package Old New
JasperFx 2.0.0-alpha.15 2.0.0-alpha.16
JasperFx.Events 2.0.0-alpha.14 2.0.0-alpha.15
JasperFx.Events.SourceGenerator 2.0.0-alpha.7 2.0.0-alpha.8
JasperFx.RuntimeCompiler 5.0.0-alpha.3 5.0.0-alpha.4
JasperFx.SourceGeneration 2.0.0-alpha.4 2.0.0-alpha.5

Consumer migrations applied

  • IEventStore.TeardownExistingProjectionProgressAsync removed. TeardownExistingProjectionStateAsync (identical signature, behavior was already identical in practice) is the consolidated replacement. Marten's DocumentStore already implemented the State variant separately; the dead sync-throw stub of the Progress variant is removed.
  • IMetadataContext.LastModifiedByCurrentUserName. Updates StreamTenantMetadataContext (drops the duplicate that mirrored the old name; the CurrentUserName property was already alongside it) and the UserNameColumn / LastModifiedByColumn session-side reads. DocumentMetadata.LastModifiedBy and ITracked.LastModifiedBy (Marten's own stored "who modified this row" columns) are NOT affected — only the session-level current-user property changed.
  • Oakton shims removed. Helpdesk sample's Helpdesk.Api/Program.cs and Helpdesk.Api.Tests/Settings.cs switch:
    • Oakton.OaktonEnvironmentJasperFx.JasperFxEnvironment
    • ApplyOaktonExtensionsApplyJasperFxExtensions
    • RunOaktonCommandsRunJasperFxCommands

Punch-list items NOT changed (already migrated or out of scope)

  • ProjectionName / ProjectionVersion / SubscriptionName / SubscriptionVersion — no consumer usages remain in the src/Marten.slnx-built tree (the few hits are either DeadLetterEvent's own stored field or the [ProjectionVersion(int)] attribute, which is a different concept).
  • EventSlice.AggregateSnapshot — every call site in src/DaemonTests, src/EventSourcingTests, src/Marten already uses .Snapshot.
  • CustomGrouping(IEventSlicer<...>) removed — Marten's existing call sites pass IAggregateGrouper<TId> or lambdas, both still-supported overloads. No rewrites needed.
  • src/Marten.CommandLine.Tests/ProjectionControllerTests.cs — pre-existing failures on master (missing IProjectionStore / IProjectionHost / IProjectionDatabase / AsyncProjectionShard types from an earlier alpha), not in src/Marten.slnx, separate from this wave.

Migration guide

New subsection added under the existing Obsolete API sweep in docs/migration-guide.md: "Renames coordinated with JasperFx 2.0 / JasperFx.Events 2.0" — covers each rename with before/after and the LastModifiedBy-vs-DocumentMetadata.LastModifiedBy distinction so consumers don't mass-rename the wrong member.

Test plan

  • dotnet build src/Marten.slnx -c Release — 0 errors
  • dotnet test src/CoreTests/CoreTests.csproj -c Release -f net10.0444 passed / 0 failed / 1 skipped (matches the chip's expected baseline)
  • dotnet test src/EventSourcingTests/EventSourcingTests.csproj -c Release -f net10.01321 passed / 0 failed / 6 skipped (was 1320/0/7 before Bump JasperFx alphas + unskip rebuild_the_projection_skip_failed_events #4483 unskipped rebuild_the_projection_skip_failed_events)
  • npx markdownlint-cli --disable MD009 -- docs/migration-guide.md — clean
  • Helpdesk sample's pre-existing NU1605 / NU1510 package-management failures confirmed pre-existing (reproduce on master without this PR)

🤖 Generated with Claude Code

JasperFx PR #307 (closes #273) finishes the 2.0 wave's
coordinated [Obsolete] removals. Picking up the new alphas:

  JasperFx                              2.0.0-alpha.15 → 2.0.0-alpha.16
  JasperFx.Events                       2.0.0-alpha.14 → 2.0.0-alpha.15
  JasperFx.Events.SourceGenerator       2.0.0-alpha.7  → 2.0.0-alpha.8
  JasperFx.RuntimeCompiler              5.0.0-alpha.3  → 5.0.0-alpha.4
  JasperFx.SourceGeneration             2.0.0-alpha.4  → 2.0.0-alpha.5

Consumer-side migrations driven by the bump:

  * IEventStore.TeardownExistingProjectionProgressAsync removed.
    The full-state teardown helper TeardownExistingProjectionStateAsync
    (which DocumentStore already implemented separately) is the
    replacement; behavior is identical. DocumentStore's explicit
    sync-throwing stub of the progress-only variant is now dead and
    deleted.

  * IMetadataContext.LastModifiedBy renamed to CurrentUserName.
    Updates:
      - StreamTenantMetadataContext drops the duplicate LastModifiedBy
        property that mirrored the old name (CurrentUserName was already
        present alongside).
      - UserNameColumn / LastModifiedByColumn switch their session-side
        reads from session.LastModifiedBy / nameof(IMartenSession.LastModifiedBy)
        to CurrentUserName.

    Note: DocumentMetadata.LastModifiedBy and ITracked.LastModifiedBy
    are *Marten's own* stored "who-last-modified-this-row" columns and
    are NOT affected. The rename is exclusively about the session-level
    "current user name" property.

  * Oakton shims removed.
      Oakton.OaktonEnvironment       → JasperFx.JasperFxEnvironment
      Oakton.ApplyOaktonExtensions   → JasperFx.ApplyJasperFxExtensions
      Oakton.RunOaktonCommands       → JasperFx.RunJasperFxCommands
    Applied to the Helpdesk sample (Helpdesk.Api/Program.cs,
    Helpdesk.Api.Tests/Settings.cs).

Punch-list items NOT changed because they're already migrated or
out of scope:

  * ProjectionName / ProjectionVersion / SubscriptionName /
    SubscriptionVersion — no consumer usages remain in the
    Marten.slnx-built tree (the few hits are either DeadLetterEvent's
    own stored field or the [ProjectionVersion(int)] attribute).
  * EventSlice.Aggregate → Snapshot — every call site in
    src/DaemonTests, src/EventSourcingTests, src/Marten already uses
    .Snapshot.
  * CustomGrouping(IEventSlicer) removal — Marten's existing call sites
    pass IAggregateGrouper or lambdas, both still-supported overloads.
    No rewrites needed.
  * Marten.CommandLine.Tests/ProjectionControllerTests.cs — pre-existing
    failures on master (missing IProjectionStore / IProjectionHost /
    etc. types from an earlier alpha), not in src/Marten.slnx, separate
    from this wave.

Migration-guide updates: new "Renames coordinated with JasperFx 2.0 /
JasperFx.Events 2.0" subsection under the Obsolete API sweep section
covers each rename with before/after and the
LastModifiedBy-vs-DocumentMetadata.LastModifiedBy distinction.

Verified clean on alpha.16/.15/.8:
  * dotnet build src/Marten.slnx -c Release      → 0 errors
  * CoreTests                                    → 444/0/1
  * EventSourcingTests                           → 1321/0/6
  * markdownlint                                 → clean
  * Helpdesk sample's pre-existing NU1605 / NU1510 errors are
    package-management decay unrelated to this bump.

Closes #4484.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@jeremydmiller jeremydmiller merged commit 3891ad7 into master May 19, 2026
6 of 8 checks passed
@jeremydmiller jeremydmiller deleted the feat/4484-obsolete-sweep branch May 19, 2026 12:52
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.

Adopt the JasperFx 2.0 [Obsolete] sweep removals + migration-guide notes

1 participant