svengeance / Husky

Modernizing the way developers think about installers
3 stars 0 forks source link

[Feature] Alternate Dependency Resolution (Away From MakeGenericType) #23

Open svengeance opened 3 years ago

svengeance commented 3 years ago

Context

Husky currently uses type.MakeGenericType to create the dependency handler type, which subsequently resolved from the IoC container. This is incompatible with the AoT compilation model, and will cause headaches down the road if we can't replace it.

Proposals

Investigate using source generators in some fashion to see if we can get around using MakeGenericType here.

https://github.com/svengeance/Husky/blob/fbc03880bdb5b53ffabafa8f165e8dbacad8928b/src/PoC/Husky/Husky.Installer/HuskyInstaller.cs#L117-L122

Interested Users

Husky Developers

svengeance commented 3 years ago

See reference:

image

svengeance commented 3 years ago

This was solved some time ago via the DependencyHandlerResolver class. Because we're likely not going to have many supported dependencies, we don't have to SGen this for now.