-
Notifications
You must be signed in to change notification settings - Fork 724
Open
Labels
re: conditionalAbout conditional declarations in cabal files(`if`)About conditional declarations in cabal files(`if`)type: bug
Description
Describe the bug
The allow-newer constraints don't get respected when enclosed in a conditional block.
To Reproduce
Checkout this commit: https://github.com/input-output-hk/ouroboros-consensus/tree/ed184183d048af6126f9e00e32862d669e705899. And maybe you need to install some dependencies, in particular pkg-config, libsodium and liblmdb-dev in Ubuntu.
cabal build all --with-compiler=ghc-9.6.2 --dry-run
succesfully creates a build plan. However, applying this diff:
allow-newer:
, lens
, cardano-ledger-core
, cardano-ledger-alonzo
, cardano-ledger-babbage
+if impl(ghc >= 9.6)
+ allow-newer:
+ , *:base
+ , *:ghc-prim
- , *:base
- , *:ghc-primresults in cabal failing to create a build plan, by saying:
[__3] rejecting: base-4.18.0.0/installed-4.18.0.0 (conflict: small-steps-test => base>=4.12 && <4.17)
So the constraint allow-newer: *:base is not being respected.
Expected behavior
I expected cabal to produce a build plan.
System information
- Ubuntu 23.04
- cabal 3.10.1.0
- ghc 9.6.2
Metadata
Metadata
Assignees
Labels
re: conditionalAbout conditional declarations in cabal files(`if`)About conditional declarations in cabal files(`if`)type: bug