haskell - cabal new-install hakyll 无法建立依赖关系
问题描述
安装后ghcup
,我尝试hakyll
使用命令安装cabal new-install hakyll
。这会导致依赖text-conversions
库中的构建错误:
Failed to build text-conversions-0.3.0.
Build log (
/home/me/.cabal/logs/ghc-8.8.4/text-conversions-0.3.0-e3c3dbd414a885ff0e8ec81ad4c2c319c5dff5772ce6392ac561833941ecfd06.log
):
Configuring library for text-conversions-0.3.0..
Preprocessing library for text-conversions-0.3.0..
Building library for text-conversions-0.3.0..
[1 of 1] Compiling Data.Text.Conversions ( src/Data/Text/Conversions.hs, dist/build/Data/Text/Conversions.o )
src/Data/Text/Conversions.hs:152:5: error:
• Couldn't match expected type ‘Either String B.ByteString’
with actual type ‘(B.ByteString, [Char])’
• In the pattern: (bs, "")
In a case alternative: (bs, "") -> Just $ Base16 bs
In the expression:
case Base16.decode (T.encodeUtf8 txt) of
(bs, "") -> Just $ Base16 bs
(_, _) -> Nothing
|
152 | (bs, "") -> Just $ Base16 bs
| ^^^^^^^^
src/Data/Text/Conversions.hs:153:5: error:
• Couldn't match expected type ‘Either String B.ByteString’
with actual type ‘(a1, b1)’
• In the pattern: (_, _)
In a case alternative: (_, _) -> Nothing
In the expression:
case Base16.decode (T.encodeUtf8 txt) of
(bs, "") -> Just $ Base16 bs
(_, _) -> Nothing
|
153 | (_, _) -> Nothing
| ^^^^^^^
src/Data/Text/Conversions.hs:164:5: error:
• Couldn't match expected type ‘Either String BL.ByteString’
with actual type ‘(BL.ByteString, [Char])’
• In the pattern: (bs, "")
In a case alternative: (bs, "") -> Just $ Base16 bs
In the expression:
case Base16L.decode (TL.encodeUtf8 $ TL.fromStrict txt) of
(bs, "") -> Just $ Base16 bs
(_, _) -> Nothing
|
164 | (bs, "") -> Just $ Base16 bs
| ^^^^^^^^
src/Data/Text/Conversions.hs:165:5: error:
• Couldn't match expected type ‘Either String BL.ByteString’
with actual type ‘(a0, b0)’
• In the pattern: (_, _)
In a case alternative: (_, _) -> Nothing
In the expression:
case Base16L.decode (TL.encodeUtf8 $ TL.fromStrict txt) of
(bs, "") -> Just $ Base16 bs
(_, _) -> Nothing
|
165 | (_, _) -> Nothing
| ^^^^^^^
cabal: Failed to build text-conversions-0.3.0 (which is required by
exe:hakyll-init from hakyll-4.13.4.0). See the build log above for details.
知道出了什么问题以及如何解决吗?
解决方案
该软件包与本周发布text-conversions
的最新版本不兼容。base16-bytestring
所以构建失败。
一个短期的解决方案是添加一个约束,使用命令--constraint="base16-bytestring < 1"
中的标志cabal install
,或者将行添加constraints: base16-bytestring < 1
到文件~/.cabal/config
中。(链接到阴谋集团文档的相关部分)
从长远来看,text-conversions
必须修复包以在依赖项上添加版本上限base16-bytestring < 1
。您可以在以下问题中询问事物的状态:
- https://github.com/cjdev/text-conversions/pull/10
- https://github.com/haskell/base16-bytestring/issues/14
理想情况下(不一定),应该发布一个新版本的text-conversions
compatible with ,但仍然需要修复现有版本的界限,以避免出现损坏的构建计划。base16-bytestring-1.0.0.0
推荐阅读
- javascript - 根据移动语言方向更改 React Native 应用名称
- javascript - iText 7 使用 JS 脚本为 PDF 报告添加水印
- ansible - 如何访问远程主机上角色/文件下的文件
- parse-platform - 在 Parse 上安排推送通知
- python - 返回字符串中固定的数字行(数量)?
- angular - Angular 8 - 路由未发生 - 垫表行
- boost-asio - asio 使用_future 而不是 yield[ec]
- android - 我无法在 Android Studio 中的图像下放置 textview?
- c++ - 错误:从 'const char*' 到 'int' 的无效转换
- reactjs - 如何反应更新特定状态内部状态对象?