如何在Travis CI构建中为每个分解器匹配正确的Cabal规格? [英] How do I match the right Cabal spec with each resolver in my Travis CI builds?

查看:79
本文介绍了如何在Travis CI构建中为每个分解器匹配正确的Cabal规格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新我的 Haskell软件包的 .cabal 文件到Cabal 2.2a我的大多数 Travis CI构建的解析器早于LTS 12.9失败:

After updating my Haskell package's .cabal file to Cabal 2.2, most of my Travis CI builds with resolvers older than LTS 12.9 fail with:


此软件包说明遵循Cabal规范的
版本2.2。此工具最多仅支持XX.XX.XX版。

This package description follows version 2.2 of the Cabal specification. This tool only supports up to version XX.XX.XX.

其中,版本取决于我 .travis.yaml

where the version varies depending on the resolver specified in my .travis.yaml.

似乎对于每个解析器,我都需要指定一个不同的Cabal版本。实际上,由于Cabal规格的变化,我似乎需要一个不同的每个解析器的 .cabal 文件。是这样吗有没有更好的办法?在我的Travis CI版本中,如何与每个分解器匹配正确的Cabal规范?

It seems that for each resolver I need to specify a different Cabal version In fact, because of Cabal spec changes, I appear to need a different .cabal file for each resolver. Is this the case? Is there a better way? How do I match the right Cabal spec with each resolver in my Travis CI builds?

推荐答案

据我所知,Cabal规范版本和Cabal库版本始终对应,这意味着Cabal库版本2.0.CD将支持Cabal spec版本2.0和更早版本。您只需要检查每个LTS版本附带的Cabal库的版本,具体取决于GHC版本。一些链接将有所帮助:

To my knowledge, the Cabal spec version and Cabal library version always correspond, meaning that Cabal library version 2.0.C.D will support Cabal spec version 2.0 and earlier. You just need to check which version of the Cabal library ships with each LTS version, which depends on the GHC version. Some links that will help:

  • I put together a page correlating GHC, base, and Cabal versions: https://www.snoyman.com/base
  • The Stackage homepage lists the latest LTS for each GHC version in the bottom left column: https://www.stackage.org/
  • You can check the Cabal library version for a specific LTS by following a link like https://www.stackage.org/lts-9/package/Cabal, which in this case auto-redirects to https://www.stackage.org/lts-9.21/package/Cabal-1.24.2.0.

这篇关于如何在Travis CI构建中为每个分解器匹配正确的Cabal规格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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