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

stack install ghc mod无法构建构建计划

  •  1
  • Venantius  · 技术社区  · 8 年前

    我一直在尝试在堆栈项目中本地安装ghc mod。

    然而,每当我试图 stack build ghc-mod ,生成计划失败,如下所示:

    Error: While constructing the build plan, the following exceptions were encountered:
    
    In the dependencies for ghc-mod-5.8.0.0:
        cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified
                     version  (latest matching version is 0.7.3.0)
        djinn-ghc must match <0.1 && >=0.0.2.2, but the stack configuration has no specified version
                  (latest matching version is 0.0.2.3)
        extra must match <1.6 && >=1.4, but the stack configuration has no specified version  (latest
              matching version is 1.5.3)
        fclabels must match ==2.0.*, but the stack configuration has no specified version  (latest
                 matching version is 2.0.3.3)
        ghc-paths must match <0.2 && >=0.1.0.9, but the stack configuration has no specified version
                  (latest matching version is 0.1.0.9)
        ghc-syb-utils must match <0.3 && >=0.2.3, but the stack configuration has no specified
                      version  (latest matching version is 0.2.3.3)
        haskell-src-exts must match <1.20 && >=1.18, but the stack configuration has no specified
                         version  (latest matching version is 1.19.1)
        hlint must match <2.1 && >=2.0.8, but the stack configuration has no specified version
              (latest matching version is 2.0.15)
        monad-control must match >=1 && <1.1, but the stack configuration has no specified version
                      (latest matching version is 1.0.2.3)
        monad-journal must match <0.8 && >=0.4, but the stack configuration has no specified version
                      (latest matching version is 0.7.2)
        mtl needed, but the stack configuration has no specified version  (latest matching version
            is 2.2.2)
        old-time needed, but the stack configuration has no specified version  (latest matching
                 version is 1.1.0.3)
        optparse-applicative must match >=0.13.0.0 && <0.14, but the stack configuration has no
                             specified version  (latest matching version is 0.13.2.0)
        pipes must match <4.4 && >=4.1, but the stack configuration has no specified version  (latest
              matching version is 4.3.9)
        safe must match <0.4 && >=0.3.9, but the stack configuration has no specified version
             (latest matching version is 0.3.17)
        semigroups must match >=0.10.0 && <0.19, but the stack configuration has no specified
                   version  (latest matching version is 0.18.5)
        split must match >=0.2.2 && <0.3, but the stack configuration has no specified version
              (latest matching version is 0.2.3.3)
        syb must match <0.8 && >=0.5.1, but the stack configuration has no specified version  (latest
            matching version is 0.7)
        temporary must match <1.3 && >=1.2.0.3, but the stack configuration has no specified version
                  (latest matching version is 1.2.1.1)
        text must match <1.3 && >=1.2.1.3, but the stack configuration has no specified version
             (latest matching version is 1.2.3.0)
        transformers-base must match <0.5 && >=0.4.4, but the stack configuration has no specified
                          version  (latest matching version is 0.4.5.2)
    needed since ghc-mod is a build target.
    

    如果我按照警告的建议将缺少的依赖项添加到堆栈.yaml的 extra-deps

    这是你的答案堆栈.yaml:

    flags: {}
    packages:
    - .
    extra-deps:
    - cabal-helper-0.7.3.0
    - djinn-ghc-0.0.2.3
    - extra-1.5.3
    - fclabels-2.0.3.3
    - ghc-paths-0.1.0.9
    - ghc-syb-utils-0.2.3.3
    - hlint-2.0.15
    - base-4.7.0.2
    - StateVar-1.1.1.1
    - deepseq-1.3.0.2
    - vector-algorithms-0.7.0.4
    - monad-control-1.0.2.3
    - monad-journal-0.7.2
    - mtl-2.2.2
    - old-time-1.1.0.3
    - optparse-applicative-0.13.2.0
    - pipes-4.3.9
    - safe-0.3.17
    - semigroups-0.18.5
    - split-0.2.3.3
    - syb-0.7
    - temporary-1.2.1.1
    - text-1.2.3.0
    - transformers-base-0.4.5.2
    - aeson-1.4.0.0
    - ansi-terminal-0.8.0.4
    - ansi-wl-pprint-0.6.8.2
    - async-2.2.1
    - base-orphans-0.8
    - clock-0.7.2
    - cmdargs-0.10.20
    - cpphs-1.20.8
    - data-default-0.7.1.1
    - djinn-lib-0.0.1.3
    - either-4.4.1.1
    - exceptions-0.10.0
    - haskell-src-exts-util-0.2.3
    - hscolour-1.24.4
    - mmorph-1.1.2
    - old-locale-1.0.0.7
    - refact-0.3.0.2
    - stm-2.4.5.0
    - transformers-compat-0.6.2
    - uniplate-1.6.12
    - unordered-containers-0.2.9.0
    - utf8-string-1.0.1.1
    - vector-0.12.0.1
    - void-0.7.2
    - yaml-0.10.0
    - cabal-doctest-1.0.6
    - comonad-5.0.4
    - contravariant-1.5
    - distributive-0.6
    - haskell-src-exts-1.20.2
    - integer-logarithms-1.0.2.1
    - mono-traversable-1.0.9.0
    - prelude-extras-0.4.0.3
    - random-1.1
    - time-1.4.2
    - unliftio-core-0.1.1.0
    - MonadRandom-0.5.1.1
    - attoparsec-0.13.2.2
    - base-compat-0.10.4
    - bifunctors-5.5.3
    - colour-2.3.4
    - conduit-1.3.0.3
    - data-default-class-0.1.2.0
    - data-default-instances-containers-0.0.1
    - data-default-instances-dlist-0.0.1
    - data-default-instances-old-locale-0.0.1
    - dlist-0.8.0.4
    - free-4.12.4
    - hashable-1.2.7.0
    - polyparse-1.12
    - primitive-0.6.4.0
    - profunctors-5.3
    - resourcet-1.2.1
    - scientific-0.3.6.2
    - semigroupoids-5.3.1
    - tagged-0.8.6
    - th-abstraction-0.2.8.0
    - time-locale-compat-0.1.1.4
    - uuid-types-1.0.3
    resolver: ghc-8.0.2
    

    我是不是漏了什么?当然这应该更容易些。我收集到ghc mod在ghc8.2之前不受支持,所以我特意用ghc8.0.2设置了这个项目,并通过运行GHCI进行了验证(没有它自己的一长串警告)。

    我还尝试了GHC的7.x版本,它也有同样的问题,尽管依赖性略有不同。

    0 回复  |  直到 8 年前