F# pre-generated code via codegen write --language fsharp; JasperFx 2.4.1 (6.3.1)#2998
Merged
Conversation
….4.1 (6.3.1) Completes the Wolverine-on-F# story: pre-generate Wolverine's runtime code as F# from the CLI. - Pin JasperFx.* to 2.4.1 (adds the codegen `--language fsharp` flag). - Add F# emit to the static HandlerRegistry frame (WriteTypeArrayFrame): F# array literals of typeof<...> via Type.FSharpName(). Previously this threw NotSupportedException, which made `codegen write --language fsharp` fail for ANY real Wolverine app (every app generates the internal HandlerRegistry, not just user handlers). - Make Wolverine.Behavioural.FSharpApp a runnable exe (Program.fs + RunJasperFxCommands, config matching BehaviouralCodegen.Configure) so the CLI can target it. - New CI proof (CodegenWriteFSharpCli): runs `dotnet run -- codegen write --language fsharp` against the F# app, asserts exit 0 (every chain emits F#) and that the generated adapter is byte-identical to the committed Generated.fs the behavioural run-step already compiles + executes under TypeLoadMode.Static. Behavioural F# test classes serialized into one non-parallel collection (nested dotnet build/run). - fsharp CI step updated to cover the CLI proof. - F# tutorial: document the `codegen write --language fsharp` workflow + the .fsproj ordered <Compile> includes. - Wolverine 6.3.1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rite # Conflicts: # Directory.Build.props # Directory.Packages.props
This was referenced Jun 2, 2026
Merged
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.
Completes the Wolverine-on-F# story — pre-generate Wolverine's runtime code as F# from the command line — and cuts 6.3.1.
JasperFx side (already published as 2.4.1)
JasperFx 2.4.1 (JasperFx/jasperfx#406) adds a
--languageflag to thecodegencommand:Wolverine side (this PR)
HandlerRegistry(WriteTypeArrayFrame): emits F# array literals oftypeof<…>viaType.FSharpName(). This frame previously threwNotSupportedException, which madecodegen write --language fsharpfail for any real Wolverine app — every app generates the internalHandlerRegistry, not just user handlers. This is the "& Wolverine" half of the work.Wolverine.Behavioural.FSharpApprunnable (aProgram.fscallingRunJasperFxCommands, with discovery config matchingBehaviouralCodegen.Configure) so the CLI can target it.CodegenWriteFSharpCli): runsdotnet run -- codegen write --language fsharpagainst the F# app, asserts exit 0 (every chain — including the internalHandlerRegistry— emits F#), and that the generated handler adapter is byte-identical to the committedGenerated.fsthat the behavioural run-step already compiles and executes underTypeLoadMode.Static. So: the CLI produces the same F# that's proven to run. (Behavioural F# test classes serialized into one non-parallel collection — they spawn nesteddotnet build/run.)codegen write --language fsharpworkflow and the ordered<Compile>includes F# requires.Verification
dotnet build wolverine.slnx -c Releaseclean against JasperFx 2.4.1.GeneratedHandlerRegistry.fscompiles.Merge-order note
This bumps
Directory.Packages.propsJasperFx pins to 2.4.1, superseding the 2.4.0 bump in the still-open #2997 (docs/Aspire). Merge this after, or rebase #2997, to avoid a downgrade.🤖 Generated with Claude Code