Skip to content

Bump JasperFx to 2.0.0-alpha.11 + JasperFx.Events to 2.0.0-alpha.4 (closes #265, #266)#273

Merged
jeremydmiller merged 1 commit into
masterfrom
bump/jasperfx-2.0.0-alpha.8
May 13, 2026
Merged

Bump JasperFx to 2.0.0-alpha.11 + JasperFx.Events to 2.0.0-alpha.4 (closes #265, #266)#273
jeremydmiller merged 1 commit into
masterfrom
bump/jasperfx-2.0.0-alpha.8

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Summary

Picks up 7 alphas of accumulated JasperFx work and closes the two AOT-annotation issues that the pre-existing `IsAotCompatible=true` on `Weasel.Core` had been flagging.

Pin bumps

Package Before After
JasperFx 2.0.0-alpha.1 2.0.0-alpha.8
JasperFx.Events 2.0.0-alpha.1 2.0.0-alpha.3
Weasel central version 9.0.0-alpha.2 9.0.0-alpha.3

What JasperFx alpha.8 brings (relevant to Weasel):

AOT closures

The pre-existing `IsAotCompatible=true` on `Weasel.Core.csproj` (landed earlier in this 9.0 wave) flagged two warnings:

#265 — `Spectre.Console.AnsiConsole.WriteException` (IL3050)

Location: `src/Weasel.Core/CommandLine/AssertCommand.cs:34`. `db-assert` is a dev-time CLI command, not a production hot path. The naive fix — `[RequiresDynamicCode]` on the `Execute` override — triggers IL3051 because the JasperFx base method `JasperFxAsyncCommand.Execute(T)` isn't annotated, and annotating it there would ripple to every JasperFx command across the Critter Stack. Used `[UnconditionalSuppressMessage("AOT", "IL3050")]` with explicit justification, scoped to this call site. Documented an upgrade path: if JasperFx ever annotates the base, swap the suppression for `[RequiresDynamicCode]`.

#266 — `CommandBuilderBase.AddParameters(object)` (IL2075)

Location: `src/Weasel.Core/CommandBuilderBase.cs:300`. The static type is `object`, which can't carry a `[DynamicallyAccessedMembers]` annotation at the parameter site. Used `[RequiresUnreferencedCode]` to propagate the warning to AOT-publishing consumers, with a remark pointing them at the `IDictionary<string, T>` overloads (which don't reflect and remain trim-safe).

Verification

  • `dotnet build Weasel.slnx -c Debug` — clean across every Weasel.* project on net9.0 + net10.0
  • `dotnet build src/Weasel.Core/Weasel.Core.csproj` — zero IL warnings (was: 2 before this PR)

Closes

🤖 Generated with Claude Code

Refreshes the AOT-cleanup PR forward to the foundation alphas that just
shipped from #247 / #250 (the IsAotCompatible=true flip
and the CommandLine reflective surface annotation pass). Adopting these
gives Weasel.Core / Weasel.* the precise [RequiresUnreferencedCode] /
[RequiresDynamicCode] annotations on JasperFx.CommandLine entry points
in time for the 9.0.0-alpha.3 cut.

Carries the existing weasel#265 + weasel#266 fixes from the original
alpha.8 bump branch:

  - AssertCommand override carries [UnconditionalSuppressMessage("AOT",
    "IL3050")] for the dev-time Spectre.Console exception writer (#265)
  - CommandBuilderBase.AddParameters(object) carries
    [RequiresUnreferencedCode] for the runtime reflection it does (#266)

Local Weasel.Core build clean against alpha.11 / alpha.4. The next
Publish Nugets workflow run cuts Weasel.* 9.0.0-alpha.3 (Directory.Build.props
is already at that version line).
@jeremydmiller jeremydmiller force-pushed the bump/jasperfx-2.0.0-alpha.8 branch from d940dc8 to 4174b73 Compare May 13, 2026 00:37
@jeremydmiller jeremydmiller changed the title Bump JasperFx to 2.0.0-alpha.8 + clear remaining AOT warnings (closes #265, #266) Bump JasperFx to 2.0.0-alpha.11 + JasperFx.Events to 2.0.0-alpha.4 (closes #265, #266) May 13, 2026
@jeremydmiller

Copy link
Copy Markdown
Member Author

Refreshed from JasperFx 2.0.0-alpha.8 → 2.0.0-alpha.11 and JasperFx.Events 2.0.0-alpha.3 → 2.0.0-alpha.4 (both shipped today from #247 / #250 / #251). The original AOT-cleanup commits (#265 + #266) are preserved in the amended commit; force-pushed.

Once CI is green and this merges, the Publish Nugets workflow cuts Weasel.* 9.0.0-alpha.3 (the version is already set in Directory.Build.props).

@jeremydmiller jeremydmiller merged commit f1c02ef into master May 13, 2026
21 checks passed
@jeremydmiller jeremydmiller deleted the bump/jasperfx-2.0.0-alpha.8 branch May 13, 2026 00:56
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.

1 participant