F# emit for the remaining service/codegen frame surface (2.2.7)#400
Merged
Conversation
Add GenerateFSharpCode to the JasperFx frames that still threw NotSupportedException on the F# path, completing the frame surface the Wolverine EF Core static-codegen slice exercises: - LazyServiceLocationFrame -> GetRequiredService<T>(provider) (the frame the EF Core render needed) - AppendActivityEventFrame -> if not (isNull Activity.Current) then ...AddEvent(...) |> ignore (no null-conditional in F#) - ReturnValueTask -> trailing ValueTask<T>(result) expression - NowFetchFrame -> let now = System.DateTime.UtcNow - CreateArrayFrame -> F# array literal [| a; b |] + keyed-mirror guard - MemberAccessFrame -> let x = parent.Member TemplateFrame is intentionally left throwing: its body is an arbitrary C# template supplied by the subclass, so a generic F# re-emit is unsafe. Each frame is covered by a new sample type in the checked-in F# compile-gate fixture (FSharpCodegenSample / FSharpCodegenTarget); the gate compiles the regenerated Generated.fs on net9.0 and net10.0. Bumps to 2.2.7. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 #399.
Wiring the first Wolverine EF Core static-codegen slice through the F# emit path hit
LazyServiceLocationFramewith noGenerateFSharpCode(mid-renderNotSupportedException). A sweep forGenerateCodeoverrides lacking an F# counterpart found the rest of the frame surface, all added here:LazyServiceLocationFramelet x = ServiceProviderServiceExtensions.GetRequiredService<T>(provider)— the frame the EF Core render neededAppendActivityEventFrameif not (isNull Activity.Current) then Activity.Current.AddEvent(...) |> ignore(no?.in F#)ReturnValueTaskValueTask<T>(result)expression (noreturnkeyword)NowFetchFramelet now = System.DateTime.UtcNowCreateArrayFrameMemberAccessFramelet x = parent.MemberTemplateFrameis intentionally left throwing — its body is an arbitrary C# template string supplied by the subclass, so a generic F# re-emit is unsafe; F# support there is a subclass responsibility.Coverage
Each frame gets a dedicated sample type in
FSharpCodegenSample(contracts inFSharpCodegenTarget), so the checked-in compile-gate regeneratesGenerated.fsand compiles it on net9.0 and net10.0. Gate is green.Bumps
JasperFxVersionto 2.2.7.🤖 Generated with Claude Code