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

陌路散爱 提交于 2019-12-08 15:33:49

问题


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?


回答1:


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.




回答2:


Yep. stack.yaml has a whole bunch of (not always necessary) fields such as the extra dependencies that matter for consistent builds. Check it in.



来源:https://stackoverflow.com/questions/31628186/is-the-stack-yaml-file-supposed-to-be-checked-into-version-control

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!