2017-07-25 43 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應該正常工作

相關問題