ActivatorUtilities not depending on ctor order for creating instances#75846
ActivatorUtilities not depending on ctor order for creating instances#75846maryamariyan merged 9 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to this area: @dotnet/area-extensions-dependencyinjection Issue DetailsWent over existing test cases and the ones presented in PR #67493 by @mapogolions and adding some more use cases to investigate behavioral change with this fix. Fixes #46132
|
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests/Autofac.cs
Outdated
Show resolved
Hide resolved
...s/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj
Outdated
Show resolved
Hide resolved
|
Lamar seems broken. It's not properly setting Related discussion: JasperFx/lamar#355 |
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
...s/DI.External.Tests/Microsoft.Extensions.DependencyInjection.ExternalContainers.Tests.csproj
Outdated
Show resolved
Hide resolved
eerhardt
left a comment
There was a problem hiding this comment.
This LGTM. Thanks for the good work here @maryamariyan!
We can update the other external providers in a separate PR.
- Lamar once their bug is fixed.
- Grace once a new stable version is released
- DryIoc should be able to be updated now, and remove the SupportsIServiceProviderIsService override, but that can be a separate PR.
...libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.DependencyInjection.Abstractions/src/ActivatorUtilities.cs
Outdated
Show resolved
Hide resolved
We should have better logic when IServiceProviderIsService is either not registered, or gives false-negatives
b53faa2 to
1a428c7
Compare
...libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
...ons.DependencyInjection/tests/DI.Tests/Microsoft.Extensions.DependencyInjection.Tests.csproj
Outdated
Show resolved
Hide resolved
6e46bd1 to
54e17ae
Compare
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.DependencyInjection.Specification.Tests/src/ActivatorUtilitiesTests.cs
Outdated
Show resolved
Hide resolved
tarekgh
left a comment
There was a problem hiding this comment.
LGTM!
Should we mark this PR as a breaking change to file a doc for it?
|
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
eerhardt
left a comment
There was a problem hiding this comment.
Looks great. Thanks for the great work here, @maryamariyan!
Went over existing test cases and the ones presented in PR #67493 by @mapogolions and adding some more use cases to investigate behavioral change with this fix.
Fixes #46132