【问题标题】:Stack only finds newer version of CabalStack 只找到较新版本的 Cabal
【发布时间】:2019-08-02 07:24:06
【问题描述】:

我正在尝试使用 Stackage lts-13.12 构建我的项目。

在 Stack 抱怨 Cabal 版本太新后,我尝试安装旧版本:

cabal --version
  cabal-install version 2.2.0.0
  compiled using version 2.2.0.1 of the Cabal library 

但是,当我运行 stack solver 时,我收到以下错误:

Using configuration file: stack.yaml
Using cabal packages:
- ./

Using resolver: lts-13.12

Warning: Installed version of cabal-install (2.4.1.0) is newer than stack has been tested with.  If you run into difficulties, consider downgrading.

Using compiler: ghc-8.6.4
Asking cabal to calculate a build plan...
Trying with packages from lts-13.12 and 1 external packages as hard constraints...
The following lines from cabal-install output could not be parsed: 
optparse-applicative-0.14.3.0 (via: project-0.1.0.0 project-0.1.0.0) (new
package)
CallStack (from HasCallStack):
  error, called at src/Stack/Solver.hs:174:16 in stack-1.9.3-F7FXKCpM3pk5wCtbL9Utvv:Stack.Solver

我的问题是:

  • 为什么 Stack 看到更新的阴谋集团?我怎样才能让它看到旧的?
  • 为什么 Stack 与 Cabal 2.4.1.0 不兼容,而这是 Stackage LTS 13.12 中的版本?

我正在运行 Stack 的 Version 1.9.3,如果这有什么不同的话。

【问题讨论】:

    标签: haskell ghc cabal haskell-stack cabal-install


    【解决方案1】:

    已知堆栈求解器错误消息是错误的并且会阻塞 cabal 输出。我不认为这个功能维护得很好。

    我希望堆栈更新它的错误和警告。坚持使用 cabal-install-2.4.1.0 可能是最好的选择。

    我建议您不要使用stack solver,而是强制它使用 lts-13.12,然后手动添加额外的 dep 以解决您遇到的任何问题。大多数时间堆栈将有助于推荐正确的额外 deps(不使用求解器),但您确实需要运用一些直觉来确保它们是正确的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多