-
Notifications
You must be signed in to change notification settings - Fork 701
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
cabal list-bin cabal-tests (and others) fails with "No or multiple targets given" #7679
Comments
It looks like this happened in the wild agda/agda#4216 (comment) |
@mouse07410 in #7739 you explicitly mentioned cabal 3.6 in the title. Is this a regression from 3.4 or earlier? |
I mentioned 3.6.0.0 because that's what I'm using, and thought you need to know. Unfortunately, I don't even have Since I never tried this command (list-bins) in the past, and only trying it now to avoid the rebuild caused by |
No need. I just wanted to confirm you weren't implying this is a regression (from what I remember it isn't, it's always been like this).
relevant cabal-plan ticket: |
strange, I was able to install cabal-plan executable in the past, maybe some project config is interfering with? could you try to execute the command outside of any project (so out of any subdir of a project too)? will try to reproduce asap |
No need to. A couple-of-days-old cabal installed Problem - it's of limited usefulness fur dynamic executables. |
If I could - I would. Sorry, beyond my competence. E.g., I can tell a good painting from a bad one, but I can't re-create a good one ;-) |
Not sure if it is related: After adding a test suite to a package, I tried all kinds of syntax for qualifying the target (as described in the latest docs), but none worked and some resulted in confusing failure messages, that indicate that more might be wrong with |
I made the failure message a bit more verbose and it turns out that the problem is that So, problem (at least in my case) seems to be that cabal includes the test suite in the result, even though it is clearly not specified as a target. |
Some more details. Here is an example run that logs the Note how the qualified target selector explicitly selects: the package (
|
cf. #7791 for a proposed fix |
#7791 resolves the original issue that is described above: > cabal list-bin cabal-testsuite:exe:cabal-tests
cabal: No or multiple targets given
> $(cabal list-bin cabal-install:cabal) list-bin cabal-testsuite:exe:cabal-tests
/Users/lars/Code/github/cabal/dist-newstyle/build/x86_64-osx/ghc-9.0.1/cabal-testsuite-3/build/cabal-tests/cabal-tests |
Describe the bug
cabal list-bin cabal-tests
complains about zero or multiple targets, even when a qualified target is used. I'm not sure why the error happens only with cabal-testsTo Reproduce
Expected behavior
System information
cabal run
andcabal list-bin
#7408 appliedAdditional context
#7648 (comment)
Workaround
use cabal-plan list-bin
The text was updated successfully, but these errors were encountered: