recommends¶
Required: No
Type: List of component references
Condition: Partial (no unless
)
Components can provide hints about other recommended components to the rest of the project. During project resolution, it is possible that a requirement cannot be satisfied because multiple components provide an implementation. If any of the components already present in the project recommends a specific implementation, this component shall be selected for inclusion. The list of recommends is only used to resolve unsatisfied requirements after project resolution has failed produce a complete project using only provides/requires/recommends.
If multiple conflicting implementations are recommended, the choice must be given to the user in the same way as if nothing was recommended, but the recommended implementations can be highlighted. If the recommended implementation is instantiable, all instances in the instance list of the recommendation are added to the project. If multiple components recommend different instances of the same component to fulfill a requirement, the choice of which instances to add must be given to the user in the same way as when components recommend different components to fulfil the requirement.
Key | Required | Type | Description |
---|---|---|---|
id |
Yes | String | ID of the recommended component |
instance |
If component is instantiable | List of strings | List of instance names. Subject to instance naming restrictions /[A-Za-z0-9_]+/ , since instance names must be usable as C/C++ symbols. |
condition |
No | List of features | The recommendation is considered if all the given features are present |
When an instantiable component has been added to the project due to being recommended, GUI tools are recommended to recognize if the user adds more instances of the component, effectively making it explicitly selected, which removes the recommendation and thus the instance that was automatically added. In this case, the GUI tool should either prompt the user whether they want to preserve the previously automatically-added instance as an explicit instance in the project, or automatically elevate it to an explicit instance without prompt.
1 2 3 4 5 6 7 8 |
|