Marten: foundation re-pin + adopt lifted async-daemon distributors + cut 9.0.0-alpha.5#4511
Merged
jeremydmiller merged 3 commits intoMay 19, 2026
Merged
Conversation
… SourceGeneration alpha.9 + Weasel alpha.7 Weasel 9.0.0-alpha.7 is required (not just newer): its AdvisoryLock now implements JasperFx.Events.Daemon.IAdvisoryLock directly (the nuspec picks up a JasperFx.Events 2.0.0-alpha.19 dependency), which unblocks adopting the lifted *ProjectionDistributor concretes in the following commits. JasperFx.RuntimeCompiler is not referenced by any Marten csproj (retired in #4454), so there is no RC pin to bump. src/Marten builds clean across net9/net10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nDatabase + *ProjectionDistributor concretes from JasperFx.Events Bumps JasperFx.Events alpha.19 -> alpha.20 (the alpha that ships the SingleTenantProjectionDistributor lift, JasperFx #320). Interfaces (Phase 2): - Delete Marten-local IProjectionDistributor.cs / IProjectionSet.cs; consume the JasperFx.Events.Daemon canonical versions. - MartenDatabase now implements IProjectionDatabase (Identifier comes from the Weasel DatabaseBase; DatabaseUri is the canonical descriptor URI, explicit interface impl, off the public surface and never hit on the daemon hot path). - ProjectionSet keeps its Marten-side concrete role (implements the lifted IProjectionSet); BuildDaemon() dropped — it had no callers and isn't part of the lifted contract. Concretes (Phase 3): - Delete Marten's Solo/SingleTenant/MultiTenanted distributors. - ProjectionCoordinator.BuildDistributor wires the JasperFx.Events versions with closures over Marten's tenancy (AllDatabases / Storage.Database), shards (Projections.AllShards), the Postgres lock factory, the ProjectionSet factory, the event schema name (SingleTenant lock-id qualifier), and DaemonLockId. - The lock factory returns Weasel.Postgresql.AdvisoryLock, which implements JasperFx.Events.Daemon.IAdvisoryLock directly as of Weasel 9.0.0-alpha.7 — no wrapper needed. Lock-id formula is unchanged: the lifted SingleTenant routes through ProjectionLockIds.Compute(schema, shard, baseLockId), byte-identical to Marten's prior Math.Abs(hash)+DaemonLockId. Full solution builds clean across net9/net10. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Foundation re-pin + async-daemon distributor dedupe alpha. AOT smoke builds and runs clean; modular-config gate green (5/5). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 20, 2026
Closed
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.
Closes the "Async daemon abstractions — confirm Marten consumes the JasperFx.Events 2.0 versions; remove any Marten-side fork" dedupe row and the "Cut Marten 9.0.0-alpha.5" foundation re-pin from Marten#4349. Sibling to Polecat #118 (interfaces) + Polecat #119 (concretes).
Foundation re-pin
JasperFx2.0.0-alpha.172.0.0-alpha.20JasperFx.Events2.0.0-alpha.162.0.0-alpha.20JasperFx.Events.SourceGenerator2.0.0-alpha.92.0.0-alpha.12JasperFx.SourceGeneration2.0.0-alpha.62.0.0-alpha.9Weasel.Postgresql/Weasel.EntityFrameworkCore9.0.0-alpha.69.0.0-alpha.7Marten9.0.0-alpha.49.0.0-alpha.5JasperFx.Eventsis pinned at alpha.20 rather than the chip's alpha.19 — theSingleTenantProjectionDistributorlift (JasperFx #320) only shipped in alpha.20. Weasel alpha.7 is load-bearing: itsAdvisoryLocknow implementsJasperFx.Events.Daemon.IAdvisoryLockdirectly (nuspec picks up aJasperFx.Events 2.0.0-alpha.19dep), which is what lets Marten pass it straight to the lifted distributors with no wrapper.JasperFx.RuntimeCompileris not referenced by any Marten csproj (retired in #4454), so there was no RC pin to bump.Distributor dedupe
Deleted (Marten-local):
Events/Daemon/Coordination/IProjectionDistributor.csEvents/Daemon/Coordination/IProjectionSet.csEvents/Daemon/Coordination/SoloProjectionDistributor.csEvents/Daemon/Coordination/SingleTenantProjectionDistributor.csEvents/Daemon/Coordination/MultiTenantedProjectionDistributor.csAdopted from
JasperFx.Events.Daemon:IProjectionDistributor,IProjectionSet,IProjectionDatabase, and theSolo/SingleTenant/MultiTenantedconcretes.Consumption-site changes:
MartenDatabase : IProjectionDatabase—Identifiercomes from the WeaselDatabaseBase;DatabaseUriis an explicit-interface impl returning the canonical descriptor URI (off the public surface, never hit on the daemon hot path).ProjectionSetretained as the Marten-sideIProjectionSetimplementation; deadBuildDaemon()dropped (no callers, not part of the lifted contract).ProjectionCoordinator.BuildDistributorconstructs the lifted distributors with closures over Marten's tenancy (Storage.AllDatabases/Storage.Database), shards (Projections.AllShards), the Postgres lock factory (WeaselAdvisoryLock), theProjectionSetfactory, the event schema name (SingleTenant lock-id qualifier), andDaemonLockId.Lock-id formula is unchanged: the lifted
SingleTenantProjectionDistributorroutes throughProjectionLockIds.Compute(schema, shard, baseLockId), byte-identical to Marten's priorMath.Abs(hash)+DaemonLockId.Verification
dotnet build src/Marten.slnx -c Release— 0 errors (net9 + net10).InvalidProjectionException: No source-generated dispatcher found(BlueProjection/GreenProjection/FakeSingleStream*Projectionaren'tpartial— bit-rotted ManualOnly fixtures; fail identically on clean master).daemon.IsRunningleadership timing assertions; all fail on clean master too (single-daemon HotCold + AdvisoryLocks tests, which exercise the new distributors on the happy path, pass).Marten.AotSmokebuilds + runs clean (no new IL warnings from the changed files).ModularConfigTests— 5/5 (PR Marten#4472: Modular composite configuration smoke + behavior tests across satellite assemblies #4495 gate).Follow-up (out of scope, not a regression here)
DaemonTests.ManualOnly'sBlueProjection/GreenProjection/FakeSingleStream*Projectionfixtures need to be madepartial(+ the project needs theJasperFx.Events.SourceGeneratoranalyzer) to satisfy the post-#276 source-gen dispatcher requirement. They've bit-rotted since that landed because the project is excluded from CI. Worth a separate clean-up issue.🤖 Generated with Claude Code