Open RonnyPfannschmidt opened 3 months ago
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