Skip to content

Conversation

@jbogard
Copy link
Contributor

@jbogard jbogard commented Apr 1, 2020

Previous pull request: dotnet/extensions#536
Original discussion: aspnet/DependencyInjection#471
Original pull request: aspnet/DependencyInjection#635

3rd time's the charm?

I did not port the benchmark or the specification tests, as it looks like those weren't moved over that I could see.

@Dotnet-GitSync-Bot
Copy link
Collaborator

I couldn't figure out the best area label to add to this PR. Please help me learn by adding exactly one area label.

@maryamariyan
Copy link
Contributor

/azp run runtime

@maryamariyan
Copy link
Contributor

@jbogard thanks for preparing this pr again. :)

Bringing over specification tests was in the backlog of things remaining to do. I'll look into expediting that so you could include your remaining changes into the PR.

I closed and reopened the PR to just to retrigger the other builds.

@maryamariyan
Copy link
Contributor

@jbogard PR #37103 should bring over the DI.External tests.

@maryamariyan maryamariyan reopened this Jun 3, 2020
@maryamariyan
Copy link
Contributor

@jbogard I merged the PR to add the DI.Eternal tests, so you could move more of your changes now.

@jbogard
Copy link
Contributor Author

jbogard commented Jun 3, 2020

@maryamariyan thanks, will do!

@jbogard
Copy link
Contributor Author

jbogard commented Jun 23, 2020

@maryamariyan done! Moved over the external tests. It matches my original PR now.

@jbogard
Copy link
Contributor Author

jbogard commented Jun 23, 2020

There was a benchmark requested too but that'll need to be in the performance repo. Right now the benchmark would just blow up.

@maryamariyan
Copy link
Contributor

Thanks @jbogard. Looking..

Copy link
Contributor

@maryamariyan maryamariyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the question, LGTM. Thanks @jbogard for getting all the PR changes moved over to runtime repo!

cc: @pakrym @eerhardt @davidfowl

protected override IServiceProvider CreateServiceProvider(IServiceCollection serviceCollection)
public override string[] SkippedTests => new[]
{
"PublicNoArgCtorConstrainedOpenGenericServicesCanBeResolved",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we skipping these tests? Same questions for the one in Autofac

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At one point, AutoFac didn't support constraints on new. I'm not sure that's relevant though, type constraints the useful bit for services. I'll double check though, it's been a few years since I tried this example when it failed.

The others were similar, they all worked with the desired scenarios, but not necessarily all constraints (like struct). I'll update and retry those.

@eerhardt
Copy link
Member

@davidfowl @halter73 @pakrym - since there has been so much angst and discussion about this functionality in the past 3.5 years - would you mind weighing in on this PR before we merge it?

@davidfowl
Copy link
Member

Merge it. I've been concerned a about features that build more technical debt as we move to an AOT focused world. This seems like one of them.

@maryamariyan maryamariyan merged commit 211bc88 into dotnet:master Jul 16, 2020
@davidfowl
Copy link
Member

@jbogard this works with 3rd party containers right? This was the thing that caused it not to get merged before. AFAIK, that work was done right?

@davidfowl
Copy link
Member

If Autofac doesn't work then we'll need to revert... that's our most complaint container and we can't be out of sync with that.

Sorry @maryamariyan and @eerhardt

@maryamariyan
Copy link
Contributor

sorry @jbogard this killed your third PR too. I probably should have waited for the response to my question prior to merging. That would have answered @davidfowl 's concern too.

jkotas pushed a commit that referenced this pull request Jul 17, 2020
@danny-bos-tata
Copy link

This would help solve a lot of custom plumbing in our code. Hope this will be released soon. Keep up the good work :D

@davidfowl
Copy link
Member

@danny-bos-tata sorry, we reverted this change because it doesn't work with all other DI providers

@jbogard
Copy link
Contributor Author

jbogard commented Jul 17, 2020

New New pull request made, with packages updated, all pass the specification tests added.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants