Skip to content
  • Mikhail Glushenkov's avatar
    Solver support for '--allow-newer'. · d5ea0dfc
    Mikhail Glushenkov authored
    Implemented by going through all packages in the 'depResolverSourcePkgIndex' and
    applying 'relaxUpperBound' to the dependencies listed in 'build-depends'.
    
    Known issue:
    'build-depends: a < 3 && >= 2; if (someFlag): build-depends: a >= 5 && < 6'
    gets converted to
    'build-depends: >= 2; if (someFlag): build-depends: a >= 5'
    (4 is now allowed where it previously wasn't).
    
    Example:
    
        $ cabal install --dry-run ./tst
        Resolving dependencies...
        In order, the following would be installed (use -v for more details):
        array-0.3.0.3 (latest: 0.5.0.0)
        tst-0.1.0.0 (latest: 0.1.1)
    
        $ cabal install --dry-run --allow-newer=array ./tst
        Resolving dependencies...
        In order, the following would be installed (use -v for more details):
        tst-0.1.0.0 (latest: 0.1.1)
    d5ea0dfc