Skip to content

Commit b7ca81b

Browse files
Register JasperFx.Events IProjectionCoordinator base interface (#430) + JasperFx 2.13.1 / Weasel 9.2.1 (#4768)
* feat(events): register JasperFx.Events IProjectionCoordinator base interface (#430) Marten registered only its store-specific Marten.Events.Daemon.Coordination.IProjectionCoordinator subtype, so a stock host's GetService<JasperFx.Events.Daemon.IProjectionCoordinator>() returned null even though the subtype implements that base. Forward-register the JasperFx base interface to the same singleton (in both the async-daemon and Solo registration paths) so consumers (e.g. CritterWatch) can resolve the coordinator directly instead of walking GetServices<IHostedService>().OfType<...>(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * build: upgrade JasperFx 2.13.1 + Weasel 9.2.1 JasperFx / JasperFx.Events / source generators 2.13.0 → 2.13.1; Weasel.Postgresql / Weasel.EntityFrameworkCore 9.2.0 → 9.2.1 (picks up the list-partition suffix sanitization fix). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 3a2eb07 commit b7ca81b

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

Directory.Packages.props

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@
6969
<!-- JasperFx 2.12.0: dead-letter row drill-in (IEventDatabase.QueryDeadLetterEventsAsync) +
7070
DeadLetterEvent.TenantId + tenant-aware daemon PauseShardAsync/rebuild fan-out (jasperfx#453).
7171
Marten implements QueryDeadLetterEventsAsync + per-tenant FetchDeadLetterCountsAsync below. -->
72-
<PackageVersion Include="JasperFx" Version="2.13.0" />
73-
<PackageVersion Include="JasperFx.Events" Version="2.13.0" />
74-
<PackageVersion Include="JasperFx.Events.SourceGenerator" Version="2.13.0">
72+
<PackageVersion Include="JasperFx" Version="2.13.1" />
73+
<PackageVersion Include="JasperFx.Events" Version="2.13.1" />
74+
<PackageVersion Include="JasperFx.Events.SourceGenerator" Version="2.13.1">
7575
<PrivateAssets>all</PrivateAssets>
7676
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
7777
</PackageVersion>
78-
<PackageVersion Include="JasperFx.SourceGenerator" Version="2.13.0" />
78+
<PackageVersion Include="JasperFx.SourceGenerator" Version="2.13.1" />
7979
<PackageVersion Include="Jil" Version="3.0.0-alpha2" />
8080
<PackageVersion Include="Lamar" Version="7.1.1" />
8181
<PackageVersion Include="Lamar.Microsoft.DependencyInjection" Version="15.0.0" />
@@ -128,15 +128,15 @@
128128
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
129129
<PackageVersion Include="System.IO.Hashing" Version="10.0.3" />
130130
<PackageVersion Include="Vogen" Version="7.0.0" />
131-
<PackageVersion Include="Weasel.EntityFrameworkCore" Version="9.2.0" />
131+
<PackageVersion Include="Weasel.EntityFrameworkCore" Version="9.2.1" />
132132
<!-- Weasel.Postgresql 9.1.x: managed LIST partitions under multi-database (sharded) apply.
133133
9.1.2 (marten#4706): managed-partition tables are no longer destructively rebuilt — the
134134
out-of-band AddPartitionToAllTables path creates partitions while the generic schema diff
135135
leaves managed tables alone (Marten sets IgnorePartitionsInMigration on them; see DocumentTable).
136136
9.1.5 (marten#4713): the additive reconcile now SAVES/RESTORES IgnorePartitionsInMigration
137137
instead of permanently clearing it on the shared DocumentTable singleton, so a re-apply after
138138
tenant provisioning stays idempotent (no 42P07 / no rebuild). -->
139-
<PackageVersion Include="Weasel.Postgresql" Version="9.2.0" />
139+
<PackageVersion Include="Weasel.Postgresql" Version="9.2.1" />
140140
<PackageVersion Include="WolverineFx.Marten" Version="4.2.0" />
141141
<PackageVersion Include="xunit" Version="2.9.3" />
142142
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />

src/Marten/HostExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ public static IServiceCollection MartenDaemonModeIsSolo(this IServiceCollection
124124
{
125125
services.AddSingleton<IConfigureMarten, OverrideDaemonModeToSolo>();
126126
services.AddSingleton<IProjectionCoordinator, ExplicitProjectionCoordinator>();
127+
// jasperfx#430 — resolve the JasperFx.Events base interface from the Solo coordinator too.
128+
services.AddSingleton<JasperFx.Events.Daemon.IProjectionCoordinator>(s => s.GetRequiredService<IProjectionCoordinator>());
127129

128130
foreach (var descriptor in services.ToArray())
129131
{

src/Marten/MartenServiceCollectionExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ public MartenConfigurationExpression AddAsyncDaemon(DaemonMode mode)
754754
{
755755
Services.AddSingleton<Marten.Events.Daemon.Coordination.IProjectionCoordinator, ProjectionCoordinator>();
756756
Services.AddSingleton<IHostedService>(s => s.GetRequiredService<Marten.Events.Daemon.Coordination.IProjectionCoordinator>());
757+
// jasperfx#430 — also resolve the JasperFx.Events base interface, so a stock host can
758+
// GetService<JasperFx.Events.Daemon.IProjectionCoordinator>() directly instead of walking
759+
// the registered IHostedServices for one.
760+
Services.AddSingleton<JasperFx.Events.Daemon.IProjectionCoordinator>(s => s.GetRequiredService<Marten.Events.Daemon.Coordination.IProjectionCoordinator>());
757761
}
758762

759763
return this;

0 commit comments

Comments
 (0)