Closed andreasabel closed 2 years ago
Possibly distantly related: #7787.
Edit: oh, you've already seen it.
% cabal install -w ghc-7.10.3 --program-suffix=-2.8 --constraint='any.alex<3.1.4' BNFC-2.8
Warning: The package list for 'hackage.haskell.org' is 23 days old.
Run 'cabal update' to get the latest list of available packages.
Warning: The package list for 'hackage.haskell.org' is 23 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: BNFC (user goal)
[__0] rejecting: BNFC-2.9.3, BNFC-2.9.2, BNFC-2.9.1, BNFC-2.9.0, BNFC-2.8.4,
BNFC-2.8.3, BNFC-2.8.2, BNFC-2.8.1 (constraint from user target requires
==2.8)
[__0] trying: BNFC-2.8
[__1] next goal: BNFC:alex:exe.alex (dependency of BNFC)
[__1] rejecting: BNFC:alex:exe.alex-3.2.6, BNFC:alex:exe.alex-3.2.5,
BNFC:alex:exe.alex-3.2.4, BNFC:alex:exe.alex-3.2.3, BNFC:alex:exe.alex-3.2.2,
BNFC:alex:exe.alex-3.2.1, BNFC:alex:exe.alex-3.2.0, BNFC:alex:exe.alex-3.1.7,
BNFC:alex:exe.alex-3.1.6, BNFC:alex:exe.alex-3.1.5, BNFC:alex:exe.alex-3.1.4
(constraint from command line flag requires <3.1.4)
[__1] trying: BNFC:alex:exe.alex-3.1.3
[__2] next goal: BNFC:alex:exe.base (dependency of BNFC:alex:exe.alex
+/-small_base)
[__2] rejecting:
BNFC:alex:exe.base-4.8.2.0/installed-0d6d1084fbc041e1cded9228e80e264d
(conflict: BNFC:alex:exe.alex +/-small_base => BNFC:alex:exe.base>=1.0 &&
<4.8)
[__2] rejecting: BNFC:alex:exe.base-4.15.0.0, BNFC:alex:exe.base-4.14.3.0,
BNFC:alex:exe.base-4.14.2.0, BNFC:alex:exe.base-4.14.1.0,
BNFC:alex:exe.base-4.14.0.0, BNFC:alex:exe.base-4.13.0.0,
BNFC:alex:exe.base-4.12.0.0, BNFC:alex:exe.base-4.11.1.0,
BNFC:alex:exe.base-4.11.0.0, BNFC:alex:exe.base-4.10.1.0,
BNFC:alex:exe.base-4.10.0.0, BNFC:alex:exe.base-4.9.1.0,
BNFC:alex:exe.base-4.9.0.0, BNFC:alex:exe.base-4.8.2.0,
BNFC:alex:exe.base-4.8.1.0, BNFC:alex:exe.base-4.8.0.0,
BNFC:alex:exe.base-4.7.0.2, BNFC:alex:exe.base-4.7.0.1,
BNFC:alex:exe.base-4.7.0.0, BNFC:alex:exe.base-4.6.0.1,
BNFC:alex:exe.base-4.6.0.0, BNFC:alex:exe.base-4.5.1.0,
BNFC:alex:exe.base-4.5.0.0, BNFC:alex:exe.base-4.4.1.0,
BNFC:alex:exe.base-4.4.0.0, BNFC:alex:exe.base-4.3.1.0,
BNFC:alex:exe.base-4.3.0.0, BNFC:alex:exe.base-4.2.0.2,
BNFC:alex:exe.base-4.2.0.1, BNFC:alex:exe.base-4.2.0.0,
BNFC:alex:exe.base-4.1.0.0, BNFC:alex:exe.base-4.0.0.0,
BNFC:alex:exe.base-3.0.3.2, BNFC:alex:exe.base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: BNFC:alex:exe.alex, BNFC:alex:exe.base)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: BNFC:alex:exe.base,
BNFC:alex:exe.alex, base, BNFC
Try running with --minimize-conflict-set to improve the error message.
which seems correct, as alex-3.1.3 and older have base <4.8
bound.
TL:DR --constraint="any.alex <version range>"
Thanks @phadej, this worked! (Although I ran into the more severe problem that GHC <= 7.6 doesn't work on macOS due to SIP.)
TODO left: document constraint syntax better.
last actionable would be duplicate of #5373
I am trying
The constraint
alex<3.1.4
seems to be accepted (no error), but ignored: No attempts to build analex < 3.1.4
, and the generated lexer fails (likely due to a too new version ofalex
):Trying qualification, like either of
gives a syntax error:
I found the following in the changelog of 2.0.0.0:
But I don't know whether this is the last state of affairs, the documentation is not explicit about it. (See also #7535.)