`cabal run` stopped recognizing target name after `--` with cabal-install 3.18.1.0

Open
#12,231 26 comments 3 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
haskell
Domain
cli

Research direction

Start by reproducing the cabal run -- saturn-test-suite --randomize --strict command and compare cabal-install 3.18.1.0 with 3.16.1.0, using the linked Saturn discussion for context. Done means the target name is no longer passed as an unexpected argument and the behavior is covered by a suitable regression test.

Written by the indexing model from the issue text.

Description

cabal-install: cmd/run documentation regression in 3.18

I haven't had time to dig into it or make a minimal reproducer, but I wanted to report a problem I ran into that seems to be introduced by cabal-install 3.18.1.0. It works fine with 3.16.1.0. See the comment here: https://github.com/tfausak/saturn/pull/58#issuecomment-5294979002.

After running cabal build, I try to cabal run .. the test suite, which reports the executable itself as an unexpected argument:

$ cabal run -- saturn-test-suite --randomize --strict
saturn-test-suite: unexpected argument `saturn-test-suite'
Dominant language
Haskell
Stars
1.8k
Forks
766
Avg merge
5d 21h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haskell/cabal

All issues in haskell/cabal

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.