haskell / haskell/cabal

[nix-local-build] Hard to understand message when vendored package has out of date version

Open
#3,246 1 comment 0 reactions 0 assignees View on GitHub
blocked: needs reproducer cabal-install: v2-build system
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Steps to reproduce:
1. Download and vendor a package (e.g. `QuickCheck`) with some version (e.g. `2.8.1`)
2. Add a project to your workspace which requires a newer version (e.g. `>= 2.8.2`)
3. Run `cabal new-build`

You'll get an error like this:

```
ezyang@sabre:~/Dev/cabal-ghc-shake$ cabal new-build Cabal:package-tests -w ghc-shake --allow-newer=base,transformers,process,time,unix --enable-executable-dynamic --enable-tests cabal-install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: cabal-install-1.25.0.0 (user goal)
next goal: QuickCheck (user goal)
rejecting: QuickCheck-2.8.2 (constraint from user target requires ==2.8.1)
trying: QuickCheck-2.8.1
rejecting: cabal-install-1.25.0.0:!test (constraint from config file, command
line flag, or user target requires opposite flag selection)
rejecting: cabal-install-1.25.0.0:*test (conflict: QuickCheck==2.8.1,
cabal-install-1.25.0.0:test => QuickCheck>=2.8.2)
Dependency tree exhaustively searched.
```

The message "constraint from user target" is not very clear.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.