-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0-staging] Add support for enumerating keyed services with KeyedService.AnyKey #95853
[release/8.0-staging] Add support for enumerating keyed services with KeyedService.AnyKey #95853
Conversation
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection Issue DetailsBackport of #95582 to release/8.0-staging /cc @benjaminpetit Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
@benjaminpetit, @steveharter, was mail sent to tactics about this one yet? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should merge this until we address the bug I describe in #95582 (comment) and add tests for GetKeyedService<IService>(KeyedService.AnyKey)
and multiple AnyKey
registrations.
The DependencyInjection.csproj is marked as Here's the documentation: https://github.com/dotnet/runtime/blob/release/8.0-staging/docs/project/library-servicing.md |
Friendly reminder that Tuesday January 16th 4pm is the Code Complete deadline for the February Release. If the feedback gets addressed, please merge before that date and time to ensure this fix gets included in that Release. Otherwise, it'll have to wait until March. |
I think as pointed in #95582, it needs more work |
Friendly reminder that Monday February 12th is the Code Complete deadline for the March Release. If the feedback gets addressed, please merge before that date to ensure this fix gets included in that Release. Otherwise, it'll have to wait until April. |
Friendly reminder that Monday March 11th is the Code Complete date for the April Release. If you want this change to be included in that release, please address the remaining blocking feedback, get a sign-off from an area owner, and send an email to Tactics requesting approval. @benjaminpetit @halter73 |
@benjaminpetit, where are we with this? |
@benjaminpetit should we close this PR for now? |
Yes, we first need to reopen and finish #97561 (I don't think we have consensus right now on the right approach) |
So is anything happening with this? I would really use it in several of my apps. |
@benjaminpetit @halter73 friendly reminder that code complete for the August Release is July 15th. If you want this fix to be included in that release, please merge this PR before that date. |
Friendly reminder that Monday July 15th is Code Complete day, that's the deadline to get this included in the August Release. |
@halter73 @benjaminpetit this has been open for 8 months, Let's close it and come back to it if we decide we want it fixed. |
Can we PLEASE fix this? I have certain scenarios for my apps that don't work properly because AnyKey does not work properly. |
Backport of #95582 to release/8.0-staging
Note that there will be a follow-up PR that will also be backported; see #95582 (comment)
/cc @benjaminpetit
Customer Impact
Keyed services in DI are new in 8.0, and this addresses an issue when
KeyService.AnyKey
is used when quering viaIServiceProvider.GetKeyedServices<IService>(KeyedService.AnyKey)
.Previously, registering a keyed service with a
null
key would show up when callingGetKeyedServices()
, now they won't be. Whennull
is used at a key for a service, the service is not considered a keyed service.Testing
Tests were added to the original PR.
Risk
See above; there is some pending follow-up work that should be done in the same versioning release.
Other
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<ServicingVersion>1</ServicingVersion>