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'm quite new to stack and wondering whether to git commit
or .gitignore
that file.
What are the implications of either of these choices?
我会说你应该 commit stack.yaml
,因为这样可以更容易地以可重现的方式构建你的包。如果您的存储库是公共的,并且如果您在其中使用更奇特的额外依赖stack.yaml
(指向 Git 存储库的指针、源代码树中的二级 cabal 包等),这尤其相关。
一个补充的观察是,即使我们正在使用堆栈,我们仍然应该为 .cabal 文件中的依赖项提供合理的版本界限,否则对于不使用堆栈或拥有一组不同于指定的stack.yaml
。
是的。stack.yaml 有一大堆(并非总是必要的)字段,例如对一致构建很重要的额外依赖项。检查它。