我试图将hdevtools添加到堆栈项目中,所以我运行了stack build hdevtools。安装似乎是成功的,我的文本编辑器停止报告通过堆栈安装的导入库(如伊索和美味)丢失的情况。
但是,当我将这一行添加到我的dependencies文件的package.yaml部分时,事情出了问题:
- hdevtools >= 0.1 && < 1然后再次尝试运行stack build。我收到了以下错误输出:
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for my-app-name-0.1.0.0:
hdevtools is a library dependency, but the package provides no library
needed since my-app-name is a build target.
Some different approaches to resolving this:
* Consider trying 'stack solver', which uses the cabal-install solver to attempt
to find some working build configuration. This can be convenient when dealing
with many complicated constraint errors, but results may be unpredictable.
Plan construction failed.我试着运行stack solver,但这就抛出了记录为这里的异常。
如何将hdevtools声明为项目的依赖项?
发布于 2018-10-29 15:37:22
@alexis-king建议在本指南中使用设置编辑器集成。
这适用于当前项目和使用相同GHC版本的其他项目,但是当升级到新的GHC版本时,您需要再次运行它。
“国王指南”提供的更多内容:
如前所述,堆栈安装不是您想要的。像GHC、hlint、hoogle、weeder和intero这样的工具在作为沙箱的一部分安装时工作得最好,因为这样可以确保它们与您的项目正在使用的当前GHC版本相匹配。
发布于 2018-10-29 07:49:40
如何将hdevtools声明为项目的依赖项?
hdevtool是一个可执行文件,而阴谋集团没有开发依赖关系的概念(就像在其他软件包管理器(如npm等)中一样)。因此,您所能做的就是全局安装hdevtools并使其正常工作。
https://stackoverflow.com/questions/53036125
复制相似问题