Skip to content

Cover keyed constructor injection under Lamar too (#3081)#3087

Merged
jeremydmiller merged 1 commit into
mainfrom
feat-3081-lamar-keyed-ctor
Jun 12, 2026
Merged

Cover keyed constructor injection under Lamar too (#3081)#3087
jeremydmiller merged 1 commit into
mainfrom
feat-3081-lamar-keyed-ctor

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Follow-up to #3086 (which closed #3081). That PR added a keyed-constructor-injection regression test against the default container. Since #3081 was reported on Lamar, this adds an explicit Lamar variant so the scenario is covered on both containers.

The JasperFx 2.9.10 fix is in the shared codegen layer (ConstructorFrame), so it's container-agnostic — but having a Lamar test guards the Lamar ServiceVariableSource keyed-resolution path explicitly.

Changes

  • Add Lamar.Microsoft.DependencyInjection 16.0.0 to CoreTests. Its transitive JasperFx unifies up to Wolverine's 2.9.10 — no version conflict / no downgrade.
  • keyed_services_on_handler_constructor now runs the same scenario (two [FromKeyedServices] constructor params of the same service type, "Test"FirstRepo, "Test2"SecondRepo) against both the default container and Host.CreateDefaultBuilder().UseLamar(), via one shared helper.

Verification

  • Both tests pass (default container + Lamar).
  • Full CoreTests Acceptance suite (218) green — adding the Lamar package doesn't disturb other tests (Lamar only activates via UseLamar()).
  • wolverine.slnx -c Release builds clean — 0 warnings, 0 errors.

🤖 Generated with Claude Code

Follow-up to #3086. The #3081 fix (JasperFx 2.9.10) lives in the shared codegen
layer, so it applies to any container — but the issue was reported on Lamar, so
add an explicit Lamar variant of the keyed-constructor-injection test.

- Add Lamar.Microsoft.DependencyInjection to CoreTests (its transitive JasperFx
  unifies up to Wolverine's 2.9.10 — no version conflict).
- keyed_services_on_handler_constructor now runs the same scenario against both
  the default container and Host.CreateDefaultBuilder().UseLamar(), sharing one
  helper, asserting each [FromKeyedServices] constructor parameter resolves to its
  own registration.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jeremydmiller jeremydmiller merged commit 00d396a into main Jun 12, 2026
23 checks passed
This was referenced Jun 15, 2026
This was referenced Jun 23, 2026
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.

Wolverine code generation for handlers ignores KeyedDependencies

1 participant