haskell / haskell/cabal

cabal install --constraint ... should warn or fail if non-existent package is named

Open
#7,800 3 comments 2 reactions 0 assignees View on GitHub
attention: pr-welcome re: options type: discussion
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.