You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We love Hypodermic, and we're excited to use it in our project! However, we need your help.
Our team is transitioning from a C# background to a C++ project. Since we previously used Autofac with .NET, Hypodermic was a natural choice for us.
We like to organize our code into packages, which means we often build packages with abstract classes as dependencies known at compile time. Unfortunately, we're encountering exceptions related to not being able to autowire constructors when registering types for these dependencies.
To work around this, we're using registerInstanceFactory with lambdas. However, managing and maintaining thousands of such factories introduces a lot of "accidental complexity," and we’re looking for ways to simplify this process.
We understand that .NET's reflection capabilities make this easier, while C++ lacks a direct equivalent (for now). Are there any strategies to automate the registration of classes in our case? Could a preprocessor, code generation, or any other tool or approach help us avoid asking developers to manually write factories for every class?
Any advice or recommendations would be greatly appreciated!
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi everyone,
We love Hypodermic, and we're excited to use it in our project! However, we need your help.
Our team is transitioning from a C# background to a C++ project. Since we previously used Autofac with .NET, Hypodermic was a natural choice for us.
We like to organize our code into packages, which means we often build packages with abstract classes as dependencies known at compile time. Unfortunately, we're encountering exceptions related to not being able to autowire constructors when registering types for these dependencies.
To work around this, we're using registerInstanceFactory with lambdas. However, managing and maintaining thousands of such factories introduces a lot of "accidental complexity," and we’re looking for ways to simplify this process.
We understand that .NET's reflection capabilities make this easier, while C++ lacks a direct equivalent (for now). Are there any strategies to automate the registration of classes in our case? Could a preprocessor, code generation, or any other tool or approach help us avoid asking developers to manually write factories for every class?
Any advice or recommendations would be greatly appreciated!
Thanks in advance!
The text was updated successfully, but these errors were encountered: