-
Notifications
You must be signed in to change notification settings - Fork 54
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
component as type instead of string #218
Comments
Components are designed to be used only for subgraphs isolation. I cannot imagine how you can use types here. Anyway, there are currently almost no limitations on what you can use as a component except that they should be hashable. Type hints say that it should be only string and it is planned to be the only guaranteed way to use them, though we are not planning to break others. Can you, please, provide more details on how are using components? Probably, we can offer another solution or extend library for your case |
im trying to use the python type of a application component instead of its name the application is lined up that each plugin repressents a different part, and most plugins have some nested services they personally use a small subset of plugins provide "global" services consumed by the larger "ecosystem" |
Ok, sounds interesting. We'll think how can we weaken requirements for a componente type without taking to much responsibility from our side |
Lookup by entry point, types, strings and enums come to mind Keeping the baseline default limited to strings and requiring some extra work for fancy components seems fair |
in a application i'm working on, components are identified by type/type name
instead of passing them in as strings, i would like to use the type as key for consistency
The text was updated successfully, but these errors were encountered: