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
If package foo provides executables foo and bar, then cabal list-bin foo gives a message like this one:
cabal: The list-bin command is for finding a single binary at once. The target
'foo' refers to the package foo-0.0.1 which includes the
executable 'bar' and the executable 'foo'.
Sort of frustrating. A similar thing happens for cabal run. Commands like run and list-bin that are intended to choose executables should default to choosing executables over packages (or other components), possibly printing a warning (but not to the same handle the path goes to for list-bin). I haven't tested, but possibly there is a similar ambiguity problem for tests; if so, I think I'd want cabal test to prefer test: components to others with the same name. (Perhaps there should be a triage of all existing commands to see if there is a most natural class of targets for them!)
run and test should have already got this working. I tested it for run and it worked, there was no ambiguity. I submitted a PR for list-bin, which was the exception. @dmwit
Activity
edmundnoble commentedon Mar 19, 2021
runandtestshould have already got this working. I tested it forrunand it worked, there was no ambiguity. I submitted a PR forlist-bin, which was the exception. @dmwit