[Haskell-cafe] cabal file build-depends list sensitive to ordering

Olaf Klinke olf at aatal-apotheke.de
Wed Aug 30 13:41:45 UTC 2017


Dear cafe,

I discovered that stack/cabal is sensitive to permutations in the dependencies list. Is that desired behaviour and documented anywhere? 

#File stack.yaml
resolver: lts-9.2
packages:
- '.'
extra-deps: [iCalendar-0.4.0.3,mime-0.4.0.2,wx-0.92.3.0,wxcore-0.92.3.0,wxc-0.92.3.0,wxdirect-0.92.3.0]
flags: {}
extra-package-dbs: []
system-ghc: false

# In file myproject.cabal
  build-depends:       base >= 4.7 && < 5
                     , HaXml >= 1.13.3
                     , iCalendar >= 0.3.7.3
                     , containers
                     , time >= 1.6.0.1
                     , text
                     , case-insensitive
                     , xslx
                     , xlsx-tabular
                     , wx

"stack build" generates the rather uninformative error message
In the dependencies for myproject-0.2.1.0:
    xslx must match -any, but the stack configuration has no specified version

# In file myproject.cabal
  build-depends:       base >= 4.7 && < 5
                     , xlsx
                     , xlsx-tabular
                     , HaXml >= 1.13.3
                     , iCalendar >= 0.3.7.3
                     , containers
                     , time >= 1.6.0.1
                     , text
                     , case-insensitive
                     , wx

This version builds just fine. 
-- Olaf


More information about the Haskell-Cafe mailing list