本文介绍了有什么办法可以为cabal依赖关系定义标志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近遇到了一个cabal hell问题,我只能通过手动安装 在运行 cabal install 之前,在我的cabal沙盒中使用 -f transformers3 标志执行 有什么办法可以在我的应用程序的 .cabal 文件中指明我依赖于一个库,以便使用特定的构建标志来构建它? 解决方案
另见 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: trueSee also the section on flags.
更多推荐
有什么办法可以为cabal依赖关系定义标志吗?
发布评论