首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >阴谋新安装的hakyll无法构建依赖关系。

阴谋新安装的hakyll无法构建依赖关系。
EN

Stack Overflow用户
提问于 2020-09-19 11:01:39
回答 1查看 172关注 0票数 1

安装ghcup后,我尝试使用命令cabal new-install hakyll安装hakyll。这将导致依赖项text-conversions库中的构建错误:

代码语言:javascript
运行
复制
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.

你知道哪里出了问题吗?怎么解决?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-09-19 14:36:50

text-conversions包与本周发布的最新版本的base16-bytestring不兼容。所以构建失败了。

短期解决方案是添加约束,使用cabal install命令中的标志constraints: base16-bytestring < 1,或者将行constraints: base16-bytestring < 1添加到文件~/.cabal/config中。(链接到阴谋文件的相关部分)

从长远来看,必须修复text-conversions包以在依赖项base16-bytestring < 1上添加版本上限。您可以在下列问题中询问事物的状态:

理想情况下(不一定),应该发布与base16-bytestring-1.0.0.0兼容的新版本的base16-bytestring-1.0.0.0,但仍然有必要修正现有版本的界限,以避免出现错误的构建计划。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63968001

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档