-
Notifications
You must be signed in to change notification settings - Fork 12
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
dynamic service registration #571
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-3738.
|
I'd rather give the |
That's why it's a spike as I think that the final implementation will be much different than an example 😅 |
In fact thinking more about it, I think the We might even be able to use this to help with lazy loading of service modules. E.g. if you were to register the services like: craft_application.ServiceFactory.register("provider", "snapcraft.services.provider.Provider") then |
I'm all for the register approach replacing inheritance. I can't wait to see the prototype 😄 |
What needs to get done
Add an API that allows to create dynamically
ServiceFactory
from the given sequence or extend the existing one to be able to create services on demand,Why it needs to get done
We want to be able to register additional services dynamically through the API, without relying on inheritance.
To be able to do dynamically define a
ServiceFactory
extended with all the services provided by our application / library.We should be able to create a factory dynamically by just specifying additional services that should be included without an inheritance dance.
The text was updated successfully, but these errors were encountered: