I'm quite new to stack and wondering whether to git commit
or .gitignore
that file.
What are the implications of either of these choices?
I'd say you should commit stack.yaml
, as that makes it much easier to build your package in a reproducible way. That is particularly relevant if your repository is public, and if you use the more exotic kinds of extra-deps in stack.yaml
(pointers to Git repositories, secondary cabal packages within your source tree, etc.).
A complementary observation is that we should still provide reasonable version bounds for dependencies in the .cabal file even if we are using stack, as doing otherwise would make life harder for people who don't use stack or have a set of packages different than the specified by stack.yaml
.
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