是否应该将stack.yaml文件检入版本控制? [英] Is the stack.yaml file supposed to be checked into version control?

查看:96
本文介绍了是否应该将stack.yaml文件检入版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对堆栈很陌生,想知道是否要 git commit .gitignore 该文件。



这些选择的含义是什么?

解决方案

我会说你应该提交 stack.yaml ,as这使得以可重现的方式构建软件包变得更加容易。如果你的仓库是公开的,那么这是特别相关的,如果你在 stack.yaml (指向Git仓库的指针,你的内部的二次集合包)中使用更奇特的extra-deps源代码树等​​)。

一个补充的观察是,即使我们使用堆栈,我们仍然应该为.cabal文件中的依赖关系提供合理的版本边界,否则会使不使用堆栈的人或使用与 stack.yaml 指定的一组软件包不同的软件生命更难。


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.

这篇关于是否应该将stack.yaml文件检入版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆