在堆栈中使用夜间快照时需要Cabal 2.0 [英] Cabal 2.0 required when using a nightly snapshot with stack

查看:100
本文介绍了在堆栈中使用夜间快照时需要Cabal 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正尝试使用每晚设置一个新项目 - 2017-08-17 快照

stack new test --resolver nightly-2017-08-17

然而,这给出了以下错误:

However this gives the following error:

Downloading template "new-template" to create project "test" in test/ ...
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- test/test.cabal

Selected resolver: nightly-2017-08-17
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing

Cabal是其最新版本:

Cabal is in its latest version:

stack setup --upgrade-cabal
Currently installed Cabal is 2.0.0.2, newest is 2.0.0.2. I'm not upgrading Cabal.
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

这不是使用 stack 选择这个夜间快照的正确方法,或者这是工具中的一个错误?

Is this not the correct way of selecting this nightly snapshot with stack or is this a bug in the tool?

推荐答案

Cabal的文件格式已经在2.0版本中发生了变化(可能是因为背包)。你必须使用Stack版本> = 1.5.1 ,它绕过这个错误。对此的适当修复可能会在下一个版本的Stack中发布。 IIRC,这个修复已经在堆栈的主布谱中了 - 所以通过 - 仅限源代码 willl的升级也适用于您。

Cabal's file format has changed in the 2.0 release of it (likely because of backpack). You have to use Stack version >= 1.5.1 which bypasses this error. A proper fix for this will be likely released in the next version of Stack. IIRC, the fix is already in the master brach of the stack - so the upgrade via --source-only willl also work for you.

您可以在这里阅读更新日志知道更多关于它的信息。

You can read the changelog here to know more information about it.

这篇关于在堆栈中使用夜间快照时需要Cabal 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆