Skip to content

Fix GetAllServices<T>() for value-type services (#85) - #101

Merged
AGiorgetti merged 2 commits into
developfrom
codex/fix-85-value-type-discovery
Oct 7, 2026
Merged

AGiorgetti merged 2 commits into
developfrom
codex/fix-85-value-type-discovery

Conversation

@AGiorgetti

@AGiorgetti AGiorgetti commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

GetAllServices() throws because the generic helper forwards through native non-generic enumeration, which requires reference-type covariance. Restore List aggregation with GetServices() and GetKeyedServices(), preserving authoritative snapshot keys, explicit enumerable precedence, multiplicity, AnyKey exclusion and private decoration-slot filtering.

Fixes #85.

Verification

  • Test-first commit 67bc946: 30 failures and 2 passing reference controls on each of net472, net8.0, net9.0 and net10.0 before changing production code.
  • All 1,167 tests pass on each of the four targets after the fix; 32 new cases cover int/custom structs, empty/unkeyed/keyed/mixed groups, duplicate registrations, explicit instance/factory enumerables, metadata mutation and legacy non-factory providers.
  • Full Release solution build passes, including netstandard2.0. The two existing net472 package-support warnings remain.
  • Native DI 10.0.0 hot-cache checks pass on all four targets, with 100 interleaved enumerations after observed native compilation.
  • Existing open/closed-generic merging, AnyKey and decoration tests pass in the full suites.
  • Changelog updated under vNext Bug Fixes; CRLF and source encoding preserved; whitespace check passes.

Windows CI run 37631908863 passed for final head 1f44d35: 1,167 tests on each of net472/net8.0/net9.0/net10.0, plus all four native hot-cache checks. Checkout logs confirm the tested PR merge contains this exact head and develop 91c262e. Pack and Publish were skipped. This PR stays draft for human review.

Prepared with OpenAI Codex.
Co-authored-by: Codex codex@openai.com

AGiorgetti and others added 2 commits October 7, 2026 15:47
@AGiorgetti
AGiorgetti marked this pull request as ready for review October 7, 2026 14:04
@AGiorgetti
AGiorgetti merged commit f487237 into develop Oct 7, 2026
2 checks passed
@AGiorgetti
AGiorgetti deleted the codex/fix-85-value-type-discovery branch October 7, 2026 14:05
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.

GetAllServices<T> regresses for value-type services after forwarding to the Type overload

1 participant