cabal install --constraint ... should warn or fail if non-existent package is named
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Not a bug, but a suggestion: This command will happily progress
```
cabal build --constraint "this-package-does-not-exist==0"
```
I think it should warn loudly, or fail altogether. Motivation: I did have a typo in the package name that I wanted to constrain, and it took me a while to figure this out.
```
cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library
```
Contributor guide
Research direction
Start by reproducing the reported behavior with cabal build --constraint "this-package-does-not-exist==0" using the stated cabal-install version. Trace how cabal-install handles --constraint and decide whether the expected result is a warning or failure; done means nonexistent package names are no longer silently accepted, with coverage for the reported typo case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100