Dependency on unbuildable dependency gives no hint what to do

Open
#12,589 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
build-system

Research direction

Reproduce with the cabal.project.local from the report (allow-newer without ghc-prim) and run cabal build lib:Cabal-syntax. The current error reads 'Dependency on unbuildable library from ghc-bignum', while 3.16 gave a solver conflict naming ghc-prim. Done when the 3.18 message points a user to the missing allow-newer, which likely means the unbuildable-dependency check in the solver's error path. Expect maintainers to weigh in on the intended wording first.

Written by the indexing model from the issue text.

Description

needs triage type: bug

Describe the bug

In the cabal codebase (585e22c2be4baa024dffdc6ec38d822e17366a62), I am running some performance benchmarks with GHC HEAD.

The error message has regressed tremendously with cabal 3.18.2.0.

I add this cabal.project.local:

package *
    ghc-options: -finfo-table-map -fdistinct-constructor-tables
with-compiler:
    <Some GHC HEAD binary>
allow-newer: template-haskell, ghc-internal, base, ghc-bignum, containers
constraints: hashable==1.4.7.0
tests: False

Note, I forgot to add allow-newer: ghc-prim

> cabal-3.18.2.0 build lib:Cabal-syntax
Error:
    Dependency on unbuildable library from ghc-bignum
    In the stanza 'library'
    In the package 'hashable-1.4.7.0'

But with cabal 3.16:

> cabal-3.16.1.0 build lib:Cabal-syntax
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: Cabal-3.19.0.0 (user goal)
[__1] trying: base-4.23.0.0/installed-inplace (dependency of Cabal)
[__2] trying: Cabal-tree-diff-3.19.0.0 (user goal)
[__3] trying: tree-diff-0.4.1 (dependency of Cabal-tree-diff)
[__4] trying: vector-0.13.2.0 (dependency of tree-diff)
[__5] next goal: vector-stream (dependency of vector)
[__5] rejecting: vector-stream; 0.1.0.1, 0.1.0.0 (conflict: base => ghc-prim==0.14.0/installed-inplace, vector-stream => ghc-prim>=0.2 && <0.14)
[__5] fail (backjumping, conflict set: base, vector, vector-stream)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: tree-diff, vector, base, vector-stream, Cabal-tree-diff, Cabal
Try running with --minimize-conflict-set to improve the error message.

Which actually gave me an idea that I forgot to add ghc-prim.
Once I added allow-newer: ghc-prim everything works as expected.

I imagine the reason for the error message change has a very good reason, but the error message on its own is now unhelpful (at least to me).

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.