Skip to content
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

Alias hint generation should only use selected build context #7060

Open
Alizter opened this issue Feb 13, 2023 · 0 comments
Open

Alias hint generation should only use selected build context #7060

Alizter opened this issue Feb 13, 2023 · 0 comments

Comments

@Alizter
Copy link
Collaborator

Alizter commented Feb 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant