2017-07-25 52 views
0

我正在运行命令$ stack ghci azara-api:azara-test,试图在导入我的测试时输入ghci repl。 (我的项目名称为azara-api和我的测试套件名称为azara-test)。“options are incompatible”error when running'stack ghci'

$ stack ghci azara-api:azara-test 
azara-api-0.1.0.0: configure (lib + exe) 
Configuring azara-api-0.1.0.0... 
azara-api-0.1.0.0: initial-build-steps (lib + exe) 
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded -O0 
Configuring GHCi with the following packages: azara-api 
Using main module: 1. Package `azara-api' component test:azara-test with main-is file: /home/matthew/backup/azara_work/platform/api/test/Spec.hs 
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help 
<command line>: cannot satisfy -package azara-api-0.1.0.0 
    (use -v for more information) 

我不知道如何让过去的这个错误。 这个错误是什么意思?

我在尼克斯17.03。

回答

1

不幸的是,这是一个已知的bug - https://github.com/commercialhaskell/stack/issues/2790。似乎我认识的微不足道,但由于实施情况如何难以解决。

现在的解决方法是将库加载到ghci中 - stack ghci azara-api:lib azara-api:azara-test,或者可能更容易,只是stack ghci --test

另一种选择是首先通过stack build构建库。然后stack ghci应该正常工作