nicolas
nicolas

Reputation: 9805

dependencies of a haskell project

If I stack unpack hakyll-4.9.2.0 I see in the cabal file

Build-Depends:
    base                 >= 4.8    && < 5,
    ...
  If flag(checkExternal)
    Build-depends:
      http-conduit >= 2.2    && < 2.3,

After doing stack init the resolver selected is lts-7.14 which only contains http-conduit version 2.1.11 (cf https://www.stackage.org/lts-7.14/package/http-conduit-2.1.11)

However it does compile, and doing stack list-dependencies --flag hakyll:checkExternal | grep -i http yields

...
http-conduit 2.1.11

which is surprising.

When I change the resolver to nightly-2016-12-28in stack.yaml, it shows a dependency on

$ stack  list-dependencies --flag hakyll:checkExternal | grep -i http
http-conduit 2.2.3

Is there an explanation of whats could go on here ?

Upvotes: 0

Views: 139

Answers (1)

Michael Snoyman
Michael Snoyman

Reputation: 31305

In Stack, the resolver value fully specifies which packages are available. Changing flags does not in any way affect which package versions can be used.

Upvotes: 1

Related Questions