从堆栈 v2 开始,stack
产生 stack.yaml.lock
文件。
如果此文件提交到源代码管理,like stack.yaml
?或者应该是.gitignore
d?
一方面它是生成的内容并且不是源代码,另一方面它包含来自 Hackage 的依赖项的哈希值,因此对于安全的可重现构建是必要的。
最佳答案
是的。这是锁定文件存在的部分原因:可重现的构建。
These files can be stored in source control Users on other machines can reuse these lock files and get identical build plans given that the used local packages and local snapshots are the same on those machines
https://docs.haskellstack.org/en/stable/lock_files/#lock-files
关于haskell - 是否应该将 stack.yaml.lock checkin 源代码管理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64682066/