Skip to content

Dependency resolution errors due to non-upgradeable packages should refer to compiler version #7993

Open
@sjakobi

Description

@sjakobi

This issue is inspired by two stackoverflow questions where the user wasn't sure how to resolve dependency problems involving base and template-haskell:

https://stackoverflow.com/questions/71173561/how-to-resolve-dependency-issues-in-cabal-project:

$ cabal v2-build
Resolving dependencies...
cabal.exe: Could not resolve dependencies:
[__0] trying: TMS-0.1.0.0 (user goal)
[__1] trying: persistent-2.13.3.0 (dependency of TMS)
[__2] next goal: template-haskell (dependency of persistent)
[__2] rejecting: template-haskell-2.18.0.0/installed-2.18.0.0 (conflict:
persistent => template-haskell>=2.13 && <2.18)
[__2] skipping: template-haskell-2.18.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '>=2.13 && <2.18'
from 'persistent')
[__2] rejecting: template-haskell-2.17.0.0, template-haskell-2.16.0.0,
template-haskell-2.15.0.0, template-haskell-2.14.0.0,
template-haskell-2.13.0.0, template-haskell-2.12.0.0,
template-haskell-2.11.1.0, template-haskell-2.11.0.0,
template-haskell-2.10.0.0, template-haskell-2.9.0.0, template-haskell-2.8.0.0,
template-haskell-2.7.0.0, template-haskell-2.6.0.0, template-haskell-2.5.0.0,
template-haskell-2.4.0.1, template-haskell-2.4.0.0, template-haskell-2.3.0.1,
template-haskell-2.3.0.0, template-haskell-2.2.0.0 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: persistent, template-haskell)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: persistent, TMS, template-haskell

https://stackoverflow.com/questions/71092123/installing-a-haskell-program-like-hackage-cli:

$ cabal v2-build
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: hackage-cli-0.1.0.0 (user goal)
[__1] next goal: base (dependency of hackage-cli)
[__1] rejecting: base-4.15.1.0/installed-4.15.1.0 (conflict: hackage-cli =>
base>=4.10.0.0 && <4.13)
[__1] skipping: base-4.16.0.0, base-4.15.1.0, base-4.15.0.0, base-4.14.3.0,
base-4.14.2.0, base-4.14.1.0, base-4.14.0.0, base-4.13.0.0 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=4.10.0.0 && <4.13' from 'hackage-cli')
[__1] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__1] fail (backjumping, conflict set: base, hackage-cli)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, hackage-cli

It would helpful if such messages would make the connection to the compiler version being used and indicate that the problem can be resolved by picking a different version.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions