agrafix / Spock

Another Haskell web framework for rapid development
https://www.spock.li
679 stars 56 forks source link

Tutorial doesn't mention all dependencies #162

Closed mjarosie closed 3 years ago

mjarosie commented 4 years ago

After following the tutorial steps of adding dependencies through modifying .cabal file I got the following error:

/xxx/Spock-example/Spock-example.cabal was modified manually. Ignoring /xxx/Spock-example/package.yaml in favor of the cabal file.
If you want to use the package.yaml file instead of the cabal file,
then please delete the cabal file.

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

In the dependencies for Spock-0.13.0.0:
    stm-containers must match >=0.2 && <0.3, but the stack configuration has no specified version  (latest matching version is 0.2.16)
needed due to Spock-example-0.1.0.0 -> Spock-0.13.0.0

Some different approaches to resolving this:

  * Recommended action: try adding the following to your extra-deps in /mnt/c/source/mjarosie/Spock-example/stack.yaml:

- stm-containers-0.2.16@sha256:e98efa8dcf0045ea8a78a04b4e2763cf2d8bc33aad0750e2f30a67f8f4e933b1,8454

Plan construction failed.

The output of stack --version:

Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2

I was able to build the example project only after adding these two additional dependencies to extra-deps in stack.yaml:

- stm-containers-0.2.16
- focus-0.1.5.2

Additionally, as #160 suggests, the warning suggests that the Spock-example.cabal file shouldn't be modified directly.

agrafix commented 3 years ago

Updated! Thanks for the report.