Replies: 3 comments 3 replies
-
@Yeah69 Hi here.
I did not understand this part about backtracking. Generally, the main cons of using DryIoc supports passing object array I am thinking of extending this feature. In addition to the plain object Open for questions, discussion and ideas. Btw, I am genuinely interested in your approach with Source Generators, and whether you've considered StrongInject or something else? I know, there is much more SD based DI nowadays. Currently, I am working on ergonomics and usability of mine compile-time DryIoc part, which was here for a while. But still keeping the t4 (mono/t4) approach, so prove me wrong :-) Today T4 as a dotnet CLI tool has a much more pleasant UX. The bad part is always the NuGet publishing story... so will see. |
Beta Was this translation helpful? Give feedback.
-
Backtraking
I see. The thing with using Despite that said, you may and probably need a wider diagnostic tool to examine the created object graph and indicate the usage of Match the overridden dependency
First, the DIE is the cool name, hope you don't die on that hill (pun intended). Second, yeah interesting approach. I did not see it in the wild yet. Though, using the DryIoc comp-time
Yeah. Now it is simplified and integrated into DryIoc itself (no separate package). The dependency on another library to generate the CSharp code is removed (compile time dependencies are PITA) - the DryIoc sibling FastExpressionCompiler can do that and more. |
Beta Was this translation helpful? Give feedback.
-
@dadhi Hi, made a bit of progress, but unfortunately still ongoing. But I've already published some prerelease nuget packages (https://www.nuget.org/packages/MrMeeseeks.DIE). I use them to secretly try out DIE at some smaller projects that I am involved in. Feel at home if you want to try out yourself. Because there is no comprehensive documentation yet, I'll give you early access to the repo. It's probably the most effective way to have a look into the test suite if you would like to quickly look up how the features work. Before it'll surprise you. The currying is not finished yet. Up until now new Func wrappers down the resolution will reset the overrides completely instead of merging the previous with the new ones. That I plan to adjust to the latter since our discussion here. Next week I'll be on vacation and will try to make more progress. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Maybe a bit of context. I am currently working on an own compile-time DI container based on Source Generators. It's still private, but I'm already working on the finishing touches (validation, error handling, documentation, and so on).
Even though I don't have much practical experience with DryIoc, I had a lot of interest for it. Especially because it does a lot of things differently compared to Autofac which I'm most familiar with. As you know, one of those differences are the semantics of Func-wrapper parameters. For my DI container I chose to implement it very similar to the approach in DryIoc (with some differences which shouldn't matter for this discussion). Actually, it made even things easier, as the resolution is done recursively and that way I was able to just pass a collection of overrides down the resolution tree without much considerations of when to reset the overrides.
I'm thinking it through a lot. There is one caveat that is bothering me: while the Autofac approach has only one use case, the DryIoc approach has two. These are:
(That is a simplification for the sake of my argument, because Autofac does override as well if the type of the instance is registered. I'm aware of that.)
While the DryIoc approach is handy and powerful, I could imagine that it could also make things like backtracking why where which instance was injected more difficult, because the configuration of container might - depending of the use of such overrides - play a far less role.
I might be overthinking here. What is your opinion on that matter?
Can you tell me about your experiences?
And maybe about the feedback that your user give?
If you would start from scratch - with everything you know now - would you still chose the same approach? If not can you summarize what you would do differently?
Beta Was this translation helpful? Give feedback.
All reactions