Skip to content
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

Add DryIocZero compile-time capabilities to DryIoc source package #101

Closed
dadhi opened this issue Mar 31, 2019 · 4 comments
Closed

Add DryIocZero compile-time capabilities to DryIoc source package #101

dadhi opened this issue Mar 31, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@dadhi
Copy link
Owner

dadhi commented Mar 31, 2019

Here is the thread:
https://twitter.com/jeremydmiller/status/1106694539056680965?s=19

@dadhi
Copy link
Owner Author

dadhi commented Mar 31, 2019

To consider:

  • There only one of the packages can be installed: DryIoc.dll or DryIoc source, probably it is fine
  • It will allow non-breaking drop-in switch from run-time DryIoc.dll to DryIoc with compile-time capabilities.
  • If you don't want, you may not use compile-time DI - just use source code DryIoc as before.
  • You will be able to use any normal typed runtime registration for the compile-time registered placeholder - currently DryIoc zero supports instance and delegate registrations only.
  • All extensions already have a source code packages compatible with DryIoc source package. No need for separate set of extensions for DIZero. That's mean DI.MS.DI.src (ResolveMany with Meta does NOT work but collection with Meta does work #100) will work too.

Development:

  • No need to dublicate the subset of container (this is the most annoying and error prone part), just reference the same Container.cs maybe with addional #ifoptions.
  • Less code to maintain
  • There is an addional compile-time only dependency to ExpressionToCodeLib
  • Harder to benchmark dll vs. source package cause they could not be used in the same app. But we can select third-party lib as baseline to compare :)

@dadhi
Copy link
Owner Author

dadhi commented Jan 9, 2020

@dadhi dadhi added idea idea of improvement, may be later dropped or considered help wanted Extra attention is needed labels Jan 9, 2020
dadhi added a commit that referenced this issue Jan 15, 2020
@dadhi dadhi added enhancement New feature or request and removed idea idea of improvement, may be later dropped or considered labels Jan 15, 2020
@dadhi
Copy link
Owner Author

dadhi commented Jan 15, 2020

PR #210

@dadhi dadhi self-assigned this Jan 15, 2020
@dadhi dadhi added this to the v4.1.0 milestone Jan 15, 2020
dadhi added a commit that referenced this issue Jan 20, 2020
* fixing keyed cache  #205 results and fixed #208

* first compiling draft for the #101

* fixed spelling in DIZero readme

* added ResolveGenerated to Resolve

* ResolveGenerated for the keyed service

fixing CI - removing System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute

* added ResolveMany and the passing test for the Example

* rc

* moar

* renaming and package related stuff

* tests WithoutFEC

* fix source package

* add smarter initial factory id

* fix net40 target

* WIP adding to the ASP .NET Core sample the CompileTimeDI

* added troubleshooting tip

* moving the DIZero stuff to CompileTimeDI folder including example

updating release notes

* added Asp NET Core 3.1 Mvc example - WIP

* cleanup
@dadhi
Copy link
Owner Author

dadhi commented Jan 20, 2020

I have added the DIZero capabilities to DI source package but the main PITA is still T4 - likely we need other template system. Let's take this separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant