-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Is there an existing proposal similar to this?
- I have searched the existing proposals
What are you proposing?
Usually, when several components are registered with the same service identifier and the same tags/name, there is conflict for ambiguity during components resolution.
What I propose it to introduce the notion of priority as an integer value.
In case of ambiguity, the component with the highest priority is returned during resolution.
Is there any specific group of users that will benefit from this?
As a developer of open ecosystems based on extension, this mechanism is useful in use cases where we need an extension to override a "default" component.
Here, by defining an equivalent component, but with a higer priority.
What problems are you trying to solve?
This is useful in case of open extensibility, where not all extensions are known at development time.
Do you have any references or examples that can illustrate your idea?
This is a mechanism that is quite common on server side dependency injection. I'm coming from a Java development background where this priority mechanism is of great help.
What type of idea is this?
Improvement of existing idea: Similar idea exists but this is an improvement