Cabal: 'cabal check' should warn when there are no upper bounds in setup-depends

Created on 12 Aug 2017  路  6Comments  路  Source: haskell/cabal

wxc has the following custom-setup section:

  setup-depends: 
    base, 
    Cabal,
    bytestring,
    split,
    process,
    directory,
    filepath

That is, it says that its setup.hs works with any version of Cabal. However, it is lying - it actually fails to build against Cabal 2. We should warn about such obviously incorrect setup-depends and maybe even auto-rewrite the constraint on Cabal to < 2.

stanzcustom-setup good first issue easy newcomer 2-one-file-change enhancement

All 6 comments

As discussed on IRC, it'd also make sense to validate that the lower bound on lib:Cabal is consistent with the spec-version specified in the .cabal file.

As discussed on IRC, it'd also make sense to validate that the lower bound on lib:Cabal is consistent with the spec-version specified in the .cabal file.

3751 is related to this.

If you review&accept my #4701, then I'd like to tackle this as a follow-up ;)

(yet, if it's for 2.0.1, then situation is tricker :( )

Note:

      +++ custom-setup
      +++     setup-depends: base -any
      +++                    Cabal -any
      +++                    cabal-doctest >=1.0.2 && <1.1

here I know that omitting upper bounds on Cabal is safe. Cabal dependency is needed because of https://github.com/haskell/cabal/issues/4288

I'm going to work on this

Was this page helpful?
0 / 5 - 0 ratings