代码之家  ›  专栏  ›  技术社区  ›  Bjorn

如何使容器包在堆栈中与我想要的版本匹配?

  •  2
  • Bjorn  · 技术社区  · 7 年前

    在我的阴谋集团文件中,我有以下版本:

      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 我用阴谋集团的沙箱解决了这个问题。我不知道如何通过查看 --help 文档、错误、堆栈文档和搜索。如果不是通过阴谋集团文件,我如何告诉stack我想要更新版本的容器?

    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
    
    2 回复  |  直到 7 年前
        1
  •  5
  •   Sibi    7 年前

    尝试输入以下内容 stack.yaml :

    extra-deps:
    - containers-0.5.10.2
    

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

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

        2
  •  1
  •   Bjorn    7 年前

    stack solver --update-config