Is the stack.yaml file supposed to be checked into version control?

haskell, haskell-stack

Solution

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`.

Problem

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?

Original source