Reproduction for "HTTP endpoints resolves services wrong in codegen, but works in tests"#2992
Closed
PerfectlyNormal wants to merge 1 commit into
Closed
Conversation
This was referenced May 31, 2026
Honor per-file ServiceProviderSource override in the CLI codegen paths (2.3.0)
JasperFx/jasperfx#401
Merged
Member
|
Superseded by #2993 |
knotekbr
pushed a commit
to knotekbr/wolverine
that referenced
this pull request
May 31, 2026
…on (JasperFxGH-2991) JasperFx 2.3.0 (JasperFx#401) makes the `codegen write` / preview path honor WolverineHttpOptions.ServiceProviderSource, matching the runtime. Previously a service-located dependency (an opaque scoped lambda factory) was generated against an isolated serviceScope under `codegen write` even when the app configured FromHttpContextRequestServices, so the pre-generated code differed from (and was wrong vs.) the runtime-generated code — yielding two different scoped instances for one request. Carries the reproduction from JasperFx#2992 (EfCoreEndpoints /ef/servicelocation + http_handler_with_http_context_sourced_gets_the_same_service). That test exercises the runtime path (which was always correct); the codegen-write regression itself is guarded by the new DynamicCodeBuilder test in JasperFx#401. 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.
See #2991 for more detailed description