gpt4 book ai didi

haskell - 如何使容器包装在堆栈中匹配所需的版本?

转载 作者:行者123 更新时间:2023-12-02 08:12:51 25 4
gpt4 key购买 nike

在我的集团文件中,我具有以下构建依赖性:

  build-depends:       base >= 4.7 && < 5,
containers >= 0.5.10 && < 0.6

当我尝试运行 stack build时,出现以下错误:
Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for server-0.1.0.0:
containers-0.5.7.1 must match >=0.5.10 && <0.6 (latest applicable is 0.5.10.2)

我在 cabal中遇到了这个问题,我通过使用cabals的沙箱解决了它。我不知道如何通过查看 --help文档,错误,堆栈文档和搜索来解决堆栈问题。如果不通过cabal文件,如何告诉堆栈我想要较新版本的容器?

我也尝试运行 stack install containers-0.5.7.1,但没有达到我的预期。我在安装列表中看到一个容器。我注意到 documentation说堆栈默认情况下是沙盒,但是由于容器的依赖性,让它构建这个简单的源文件非常痛苦。

我注意到此命令报告了旧版本的容器,而不是我想要的版本:
$ stack list-dependencies
array 0.5.1.1
base 4.9.1.0
containers 0.5.7.1
deepseq 1.4.2.0
ghc-prim 0.5.0.0

最佳答案

尝试将以下内容放入stack.yaml:

extra-deps:
- containers-0.5.10.2

使其起作用的另一种方法是更改​​您的阴谋约束。使它像这样应该使其工作:
 build-depends:       base >= 4.7 && < 5,
containers >= 0.5.7 && < 0.6

请注意,目前Stackage中只有0.5.7.1可用。

关于haskell - 如何使容器包装在堆栈中匹配所需的版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44793106/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com