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]
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/
See example in this project which has a lot of external dependencies from GitHub.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With