有什么办法可以为cabal依赖关系定义标志吗?

编程入门 行业动态 更新时间:2024-10-27 20:28:58
本文介绍了有什么办法可以为cabal依赖关系定义标志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近遇到了一个cabal hell问题,我只能通过手动安装 在运行 cabal install 之前,在我的cabal沙盒中使用 -f transformers3 标志执行用于我的项目。

有什么办法可以在我的应用程序的 .cabal 文件中指明我依赖于一个库,以便使用特定的构建标志来构建它? 解决方案

现代的方法是使用 Stack 。编辑您的 stack.yaml 以包含

标记:变形金刚:变形金刚3:真

另见 flags 。

I recently ran into a "cabal hell" issue that I only managed to solve by manually installing transformers-compat with the -f transformers3 flag in my cabal sandbox before running cabal install for my project.

Is there any way to indicate in my application's .cabal file that I depend on a library so that it is built with the specific build flag?

解决方案

The modern way to do this is to use Stack. Edit your stack.yaml to include

flags: transformers-compat: transformers3: true

See also the section on flags.

更多推荐

有什么办法可以为cabal依赖关系定义标志吗?

本文发布于:2023-07-04 17:06:44,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:定义   标志   关系   有什么办法可以   cabal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!