You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes it is convenient to select a target if the given selector is ambiguous, either based on the component type or just the first that is accessible.
This is specifically helpful as cabal supports Filepath targets. Given a Filepath target, cabal figures out the component the filepath belongs to and loads that. However, sometimes a Filepath is part of multiple components. In that case, the target is ambiguous and no build-info is printed.
Especially for tooling, it would be better if you defaulted to just some component, as the options probably don't differ too much, and we keep working most of the time.
We propose here to add --pick-first-target to NixStyleFlags, so that users can conveniently decide to just pick a target and not error if the targets are ambiguous.
This issue is just for completeness. I do not understand the motivation for this flag and if it is the motivation I came up with, I am definitely against it, as I prefer the explicitness over some form of convenience.
This issue is just for completeness. I do not understand the motivation for this flag and if it is the motivation I came up with, I am definitely against it, as I prefer the explicitness over some form of convenience.
who could help us to understand the motivation? @bubba ?
This is specifically helpful as cabal supports Filepath targets. Given a Filepath target, cabal figures out the component the filepath belongs to and loads that. However, sometimes a Filepath is part of multiple components. In that case, the target is ambiguous and no build-info is printed.
Especially for tooling, it would be better if you defaulted to just some component, as the options probably don't differ too much, and we keep working most of the time.
Sometimes it is convenient to select a target if the given selector is ambiguous, either based on the component type or just the first that is accessible.
This is specifically helpful as cabal supports Filepath targets. Given a Filepath target, cabal figures out the component the filepath belongs to and loads that. However, sometimes a Filepath is part of multiple components. In that case, the target is ambiguous and no build-info is printed.
Especially for tooling, it would be better if you defaulted to just some component, as the options probably don't differ too much, and we keep working most of the time.
We propose here to add
--pick-first-target
toNixStyleFlags
, so that users can conveniently decide to just pick a target and not error if the targets are ambiguous.PR is here: #7482
Edit: Added better motivation
The text was updated successfully, but these errors were encountered: