Closed
Description
Could we show the import path when reporting solver rejections from project constraints?
Here's a mockup example using ascii +--
as the leader instead of the └──
leader of the tree
command output:
# cabal v2-update
Downloading the latest package list from test-local-repo
# 3-web-dot-relative.project --version-win not supplied, default
# cabal v2-build
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: cabal-version-override-0.1.0.0 (user goal)
[__1] next goal: hashable (dependency of cabal-version-override)
[__1] rejecting: hashable-1.4.3.0 (constraint from project requires ==1.4.2.0)
+-- <ROOT>/3-web-dot-relative.project requires ==1.4.2.0
[__1] rejecting: hashable-1.4.2.0 (constraint from project requires ==1.4.3.0)
+-- <ROOT>/3-web-dot-relative.project
+-- ./dot-1/hop-web.config
+-- ./stackage-web.config
+-- https://www.stackage.org/nightly-2023-12-07/cabal.config requires ==1.4.3.0
[__1] fail (backjumping, conflict set: cabal-version-override, hashable)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hashable (3), cabal-version-override (2)
I'd tried using └──
leader but it doesn't render properly. The output could be moved further left if desired but I didn't want to interrupt the flow of the [__n]
step indicators.
What we show now:
# cabal v2-update
Downloading the latest package list from test-local-repo
# 3-web-dot-relative.project --version-win not supplied, default
# cabal v2-build
Resolving dependencies...
Error: cabal: Could not resolve dependencies:
[__0] trying: cabal-version-override-0.1.0.0 (user goal)
[__1] next goal: hashable (dependency of cabal-version-override)
[__1] rejecting: hashable-1.4.3.0 (constraint from project config <ROOT>/3-web-dot-relative.project requires ==1.4.2.0)
[__1] rejecting: hashable-1.4.2.0 (constraint from project config https://www.stackage.org/nightly-2023-12-07/cabal.config requires ==1.4.3.0)
[__1] fail (backjumping, conflict set: cabal-version-override, hashable)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: hashable (3), cabal-version-override (2)
To generate the above, I ran the following with a test project I have in the works for #9510.
$ cabal run cabal-testsuite:cabal-tests -- --with-cabal=./dist-newstyle/build/x86_64-linux/ghc-9.4.7/cabal-install-3.11.0.0/x/cabal/build/cabal/cabal cabal-testsuite/PackageTests/VersionPriority/3-web.test.hs --accept
$ cabal run cabal-testsuite:cabal-tests -- --with-cabal=/home/philderbeast/.ghcup/bin/cabal cabal-testsuite/PackageTests/VersionPriority/3-web.test.hs --accept