我正在尝试使用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的Version 1.9.3
,如果这有所不同。
已知堆栈解算器错误消息是错误的并且在cabal输出上阻塞。我不相信这个功能得到很好的维护。
我希望堆栈会更新其错误和警告。坚持使用cabal-install-2.4.1.0可能是最好的选择。
而不是使用stack solver
,我建议你强制它使用lts-13.12,然后手动添加额外的deps来解决你遇到的任何问题。大多数时候堆栈将有助于推荐正确的额外deps(不使用求解器),但你需要应用一些直觉来确保它们是正确的。