При запуске stack setup в примере приложения Miso (https: // github .com / dmjio / miso / tree / master / sample-app) произошла следующая ошибка.

Укороченная версия:

exit status: 1                                
stderr: solver must be one of: modular        
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE

Подробный:

/Users/username/Documents/projects/hs/miso/sample-app$ [ghcjs-pkg]: /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg "recache" "--global" "--no-user-package-db"
installing stage 0
/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/ghcjs-boot/boot/ghc-prim$ rm_rf dist
/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/ghcjs-boot$ [cabal]: /usr/local/bin/cabal "--config-file" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig" "--ignore-sandbox" "install" "./boot/ghc-prim" "--solver=topdown" "--global" "--ghcjs" "--one-shot" "--avoid-reinstalls" "--builddir" "dist" "--with-compiler" "/Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs" "--with-hc-pkg" "/Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg" "--prefix" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs" "--enable-documentation" "--haddock-html" "--haddock-hyperlink-source" "--enable-shared" "--enable-library-profiling" "--root-cmd" "/Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh" "-v2" "--dry-run"
/usr/local/bin/cabal --config-file /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs --with-hc-pkg /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg --prefix /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling --root-cmd /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh -v2 --dry-run
solver must be one of: modular
CallStack (from HasCallStack):
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE
ghcjs-boot: error running: /usr/local/bin/cabal --config-file /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/cabalBootConfig --ignore-sandbox install ./boot/ghc-prim --solver=topdown --global --ghcjs --one-shot --avoid-reinstalls --builddir dist --with-compiler /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs --with-hc-pkg /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-pkg --prefix /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs --enable-documentation --haddock-html --haddock-hyperlink-source --enable-shared --enable-library-profiling --root-cmd /Users/username/.ghcjs/x86_64-darwin-0.2.0.9006020-7.10.3/ghcjs/run.sh -v2 --dry-run
exit status: 1
stderr: solver must be one of: modular
CallStack (from HasCallStack):                
  error, called at libraries/Cabal/Cabal/Distribution/ReadE.hs:46:24 in Cabal-2.0.1.0:Distribution.ReadE

Booting GHCJS (this will take a long time) ...Process exited with ExitFailure 1: /Users/username/.stack/programs/x86_64-osx/ghcjs-0.2.0.9006020_ghc-7.10.3/src/.stack-work/install/x86_64-osx/lts-6.20/7.10.3/bin/ghcjs-boot --clean

Версия стека и клики:

[sample-app] stack --version                                          master  ✱
Version 1.6.3 x86_64 hpack-0.20.0
[sample-app] cabal --version                                          master  ✱
cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library 
2
pamu 3 Янв 2018 в 18:37

1 ответ

Лучший ответ

Работает после удаления cabal-install и запуска stack build. Как намекнул @MichaelSnoyman, ghcjs может ожидать правильную версию клики.

2
pamu 4 Янв 2018 в 00:41