问题描述
更新我的 .cabal
文件的解析器早于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:
其中,版本取决于我。
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:
- 我整理了一个与GHC版本,基本版本和Cabal版本相关的页面:
- Stackage主页列出了最新的LTS左下栏中的每个GHC版本:
- 您可以通过点击,在这种情况下,它会自动重定向到。
- 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规格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!