Skip to content

Add suggested fix for unbuildable ghc-bignum#11983

Open
philderbeast wants to merge 3 commits into
haskell:masterfrom
cabalism:fix/unbuildable-ghc-bignum
Open

Add suggested fix for unbuildable ghc-bignum#11983
philderbeast wants to merge 3 commits into
haskell:masterfrom
cabalism:fix/unbuildable-ghc-bignum

Conversation

@philderbeast

@philderbeast philderbeast commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Fix #11356.

This adds a note and suggestion when base has a dependency on an unbuildable ghc-bignum. Aside from transformProgressCtx, changes are local to where the message is generated. Within toConfiguredComponent we don't know the version of GHC.

Manual QA Notes

Here's the changed behaviour, from the reproduction of #11356 (comment) with cabal-fmt:

$ cabal freeze
Error:
    Dependency on unbuildable library from ghc-bignum
    In the stanza 'library'
    In the package 'base-4.19.2.0'
+   Note: This version of base is not reinstallable
+   Suggestion: Bump upper bounds on base to allow a reinstallable version

@philderbeast philderbeast force-pushed the fix/unbuildable-ghc-bignum branch from 4642b62 to 598b93d Compare June 20, 2026 17:26
@philderbeast philderbeast force-pushed the fix/unbuildable-ghc-bignum branch from 598b93d to 384e922 Compare June 24, 2026 10:40
@Bodigrim

Copy link
Copy Markdown
Collaborator

This is an improvement, but does not fix #11356. The problem is that a problematic bound on base could be in transitive dependencies.

For example,

cabal get cabal-add-0.2
cd cabal-add-0.2
cabal-3.16.1.0 build all -w ghc-9.14

used to say

Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: cabal-add-0.2 (user goal)
[__1] trying: cabal-install-parsers-0.6.3 (dependency of cabal-add)
[__2] next goal: base (dependency of cabal-add)
[__2] rejecting: base-4.22.0.0/installed-1f90 (conflict: cabal-install-parsers => base>=4.13.0.0 && <4.22)
[__2] skipping: base-4.22.0.0 (has the same characteristics that caused the previous version to fail: excluded by constraint '>=4.13.0.0 && <4.22' from 'cabal-install-parsers')
[__2] rejecting: base; 4.21.2.0, 4.21.1.0, 4.21.0.0, 4.20.2.0, 4.20.1.0, 4.20.0.1, 4.20.0.0, 4.19.2.0, 4.19.1.0, 4.19.0.0, 4.18.3.0, 4.18.2.1, 4.18.2.0, 4.18.1.0, 4.18.0.0, 4.17.2.1, 4.17.2.0, 4.17.1.0, 4.17.0.0, 4.16.4.0, 4.16.3.0, 4.16.2.0, 4.16.1.0, 4.16.0.0, 4.15.1.0, 4.15.0.0, 4.14.3.0, 4.14.2.0, 4.14.1.0, 4.14.0.0, 4.13.0.0, 4.12.0.0, 4.11.1.0, 4.11.0.0, 4.10.1.0, 4.10.0.0, 4.9.1.0, 4.9.0.0, 4.8.2.0, 4.8.1.0, 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (constraint from non-reinstallable package requires installed instance)
[__2] fail (backjumping, conflict set: base, cabal-add, cabal-install-parsers)
After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: base, cabal-install-parsers, cabal-add

Not anymore with cabal-HEAD:

Resolving dependencies...
Error:
    Dependency on unbuildable library from ghc-bignum
    In the stanza 'library'
    In the package 'base-4.19.2.0'

Even if you extend this error with "Note: This version of base is not reinstallable. Suggestion: Bump upper bounds on base to allow a reinstallable version", it still gives no clue which package needs bounds relaxed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gracefully handling old versions of base with new versions of GHC where base is reinstallable

2 participants