Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git repos in extra-deps

What's the proper way of referencing a specific version of a git repository with Stack?

Stack complains about a parse error for the first field in extra-deps section of stack.yaml. Having based the snippet below on an example from the official Stack documentation, I'm not quite sure why it doesn't work.

# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- git: https://github.com/jwaldmann/moo
  commit: b429a7d371c0b268a4bb8dbea8044054aaf04cd5
- git: https://github.com/jwaldmann/monad-mersenne-random
  commit: d1f949fe60dc0c0cfbd310b339fe7fd5ecf4c5f5
- gray-code-0.3.1
#extra-deps: [gray-code-0.3.1]
like image 986
SwiftsNamesake Avatar asked Oct 27 '17 21:10

SwiftsNamesake


2 Answers

You are probably looking at documentation for the latest development version of stack. The syntax you are using will be supported in stack 1.6 and newer, which will be released in a few days.

Note the disclaimer at the top of the documentation - https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md

Whereas you should instead look at https://docs.haskellstack.org/en/stable/yaml_configuration/

like image 182
mgsloan Avatar answered Oct 18 '22 23:10

mgsloan


See example in this project which has a lot of external dependencies from GitHub.

like image 28
Shersh Avatar answered Oct 19 '22 01:10

Shersh