-
Notifications
You must be signed in to change notification settings - Fork 470
Alias hint generation should only use selected build context #7060
Description
In #7004 we introduce hints for aliases the user might of meant if an alias is not found. Currently the implementation iterates over all the build contexts in order to generate hints, however the hints typically come from the first context considered. This is fine for most use cases, but in the presence of multiple build contexts, it would mean the user is getting hints from other build contexts.
The fix is therefore to only generate hints from the build context selected by the user, which is found in Common.context_arg. However it is not so easy to get access to this value when in alias.ml. Therefore I have left the implementation as is for the time being.
We should make an easier way to get hold of the Common.context_arg value, i.e. by making it global, and then only generate hints from the selected build context.