Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack setup and build failed. #20

Open
wpoosanguansit opened this issue Nov 3, 2016 · 3 comments
Open

stack setup and build failed. #20

wpoosanguansit opened this issue Nov 3, 2016 · 3 comments

Comments

@wpoosanguansit
Copy link

Hi I am trying out the code and I ran into a problem installing and setting up: The errors are as follow:

servant-auth-cookie git:(master) stack setup
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
➜ servant-auth-cookie git:(master) stack runghc

^C
➜ servant-auth-cookie git:(master) stack build

While constructing the build plan, the following exceptions were encountered:

In the dependencies for servant-auth-cookie-0.4:
http-api-data-0.2.3 must match ==0.3.* (latest applicable is 0.3.1)
servant-0.7.1 must match ==0.9.* (latest applicable is 0.9.0.1)

Plan construction failed.

servant-auth-cookie git:(master) cabal run example
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: servant-auth-cookie-0.4 (user goal)
next goal: wai (dependency of servant-auth-cookie-0.4)
Dependency tree exhaustively searched.
Trying configure anyway.
Configuring servant-auth-cookie-0.4...
cabal: Encountered missing dependencies:
cereal ==0.5.,
cookie >=0.4.1 && <0.5,
cryptonite >=0.14 && <=0.20,
data-default -any,
exceptions ==0.8.
,
http-types ==0.9.,
memory >=0.11 && <0.14,
servant >=0.5 && <0.10,
servant-server >=0.5 && <0.10,
tagged ==0.8.
,
wai >=3.0 && <3.3
➜ servant-auth-cookie git:(master) stack setup
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
➜ servant-auth-cookie git:(master)

Is there any other setup needed to have the code running? Thanks for your help.

@zohl
Copy link
Owner

zohl commented Nov 14, 2016

Hello,

first of all my apologies for a late response!

At the moment there is a problem with clashing dependencies of servant-0.9 and the other packages. I'll take a closer look at it during the week.
If it's not critical to use the most recent version of servant, you can turn off servant9 flag:

stack build --flag servant-auth-cookie:-servant9 

@zohl
Copy link
Owner

zohl commented Nov 15, 2016

Alright, I was mistaken, the packages are ok.

The problem was in incompatible default values of stack's resolver and servant9 flag.
This was fixed, so you can build the package by simply typing stack build.

To use newer version of servant you have to turn on servant9 flag and specify different resolver. Something like this will do the trick:

stack build --resolver nightly-2016-11-13 --flag servant-auth-cookie:servant9

(There is no servant-0.9 in lts yet.)

@zohl
Copy link
Owner

zohl commented Nov 16, 2016

One more update: I reverted default value of the flag as it caused conflicts in the nightly stack. So to use package with default resolver you should turn off the flag:

stack build --flag servant-auth-cookie:-servant9 

Or to use package with nighly resolver:

stack build --resolver nightly-2016-11-13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants