begriffs / haskell-vim-now

One-line Haskell Vim install
MIT License
989 stars 101 forks source link

setup_haskell.hs failed with error 1. #270

Closed ivnsch closed 6 years ago

ivnsch commented 6 years ago

I installed and ran the script as described in the readme. What's going on?

Ivans-MBP:haskell ivanschuetz$ vim ~/.bash_profile Ivans-MBP:haskell ivanschuetz$ bash /tmp/haskell-vim-now.sh --> Existing Haskell-Vim-Now installation detected at /Users/ivanschuetz/.config/haskell-vim-now. --- Syncing Haskell-Vim-Now with upstream... Would you like to force a sync? THIS WILL REMOVE ANY LOCAL CHANGES! [y/N]: N Current branch master is up to date. --- No new packages needed for install... --- Checking ctags' exuberance... --- Setting git to use fully-pathed vim for messages... --- Testing for broken Ruby interface in vim... --- Test passed. Ruby interface is OK. --- Backing up current vim config using timestamp 20170924_222652... /Users/ivanschuetz/.config/haskell-vim-now/backup/.vim.20170924_222652 /Users/ivanschuetz/.config/haskell-vim-now/backup/.vimrc.20170924_222652 --- Creating vim config symlinks ~/.vimrc -> /Users/ivanschuetz/.config/haskell-vim-now/.vimrc ~/.vim -> /Users/ivanschuetz/.config/haskell-vim-now/.vim --- Installing plugins using vim-plug... HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False} Setting up GHC if needed... Stack bin path: /Users/ivanschuetz/.local/bin Stack global path: /Users/ivanschuetz/.stack Stack global config location: /Users/ivanschuetz/.stack/global-project/stack.yaml Stack resolver: lts-9.5 /Users/ivanschuetz/.config/haskell-vim-now/.stack-bin -> /Users/ivanschuetz/.local/bin Installing helper binaries... stack --resolver lts-9.5 install ghc-mod --install-ghc --verbosity warning stack --resolver lts-9.5 install cabal-install --install-ghc --verbosity warning stack --resolver lts-8.14 install hindent --install-ghc --verbosity warning name: dependencies version: 0.1.0.0 synopsis: helper binaries for vim homepage: https://github.com/begriffs/haskell-vim-now license: MIT author: Joe Nelson maintainer: cred+github@begriffs.com category: Development build-type: Simple cabal-version: >=1.10

library build-depends: base >=4.9 && <4.10 , apply-refact , codex , hasktags , hlint , hoogle , hscope , pointfree , pointful default-language: Haskell2010 Looking for .cabal or package.yaml files to use to init the project. Using cabal packages:

  • dependencies.cabal

Selecting the best among 11 snapshots...

  • Partially matches lts-9.5 apply-refact not found

    • dependencies requires -any codex not found
    • dependencies requires -any hasktags not found
    • dependencies requires -any hscope not found
    • dependencies requires -any pointfree not found
    • dependencies requires -any
  • Rejected nightly-2017-09-20 ghc-8.2.1 cannot be used for these packages:

    • dependencies base version 4.10.0.0 found
    • dependencies requires >=4.9 && <4.10
  • Partially matches lts-8.24 apply-refact not found

    • dependencies requires -any codex not found
    • dependencies requires -any hasktags not found
    • dependencies requires -any hscope not found
    • dependencies requires -any pointfree not found
    • dependencies requires -any
  • Partially matches lts-7.24 codex not found

    • dependencies requires -any hasktags not found
    • dependencies requires -any hscope not found
    • dependencies requires -any pointfree not found
    • dependencies requires -any
  • Rejected lts-6.35 ghc-7.10.3 cannot be used for these packages:

    • dependencies base version 4.8.2.0 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-5.18 ghc-7.10.3 cannot be used for these packages:

    • dependencies base version 4.8.2.0 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-4.2 ghc-7.10.3 cannot be used for these packages:

    • dependencies base version 4.8.2.0 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-3.22 ghc-7.10.2 cannot be used for these packages:

    • dependencies base version 4.8.1.0 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-2.22 ghc-7.8.4 cannot be used for these packages:

    • dependencies base version 4.7.0.2 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-1.15 ghc-7.8.4 cannot be used for these packages:

    • dependencies base version 4.7.0.2 found
    • dependencies requires >=4.9 && <4.10
  • Rejected lts-0.7 ghc-7.8.3 cannot be used for these packages:

    • dependencies base version 4.7.0.1 found
    • dependencies requires >=4.9 && <4.10

Selected resolver: lts-7.24 *** Resolver lts-7.24 will need external packages: codex not found

  • dependencies requires -any hasktags not found
  • dependencies requires -any hscope not found
  • dependencies requires -any pointfree not found
  • dependencies requires -any

Using resolver: lts-7.24

Warning: Installed version of cabal-install (2.0.0.0) is newer than stack has been tested with. If you run into difficulties, consider downgrading.

Using compiler: ghc-8.0.1 Asking cabal to calculate a build plan... Trying with packages from lts-7.24 as hard constraints... The following lines from cabal-install output could not be parsed: Cabal-1.24.2.0 (latest: 2.0.0.2) (via: codex-0.5.1.2 codex-0.5.1.2 lens-aeson-1.0.1 machines-0.6.2 comonad-5.0.1 distributive-0.5.2 hackage-db-1.22 cabal-doctest-1.0.2 entropy-0.3.7 ghc-paths-0.1.0.9) (new version) ansi-terminal-0.6.3 (latest: 0.7.1.1) (via: hlint-1.9.35 concurrent-output-1.7.9 ansi-wl-pprint-0.6.7.3) (new package) base-orphans-0.5.4 (latest: 0.6) (via: lens-4.14 profunctors-5.2 semigroupoids-5.1 bifunctors-5.4.2 distributive-0.5.2) (new package) base64-bytestring-1.0.0.1 (via: authenticate-oauth-1.5.1.2 http-client-0.4.31.2 pem-0.2.2) (new package) byteable-0.1.1 (via: wreq-0.4.1.0 connection-0.2.8 x509-validation-1.6.5 cryptohash-0.11.9) (new package) bytestring-builder-0.10.8.1.0 (via: warp-3.2.12 wai-3.2.1.1 http2-1.6.2) (new package) cereal-0.5.4.0 (via: tls-1.3.10 hscope-0.4.3 pureMD5-2.1.3 crypto-api-0.13.2 socks-0.5.5) (new package) data-default-class-0.1.2.0 (via: http-conduit-2.1.11 pointed-5 http-client-tls-0.2.4.1 connection-0.2.8 warp-tls-3.2.3 tls-1.3.10 x509-validation-1.6.5 http-client-0.4.31.2 cookie-0.4.2.1 data-default-0.7.1.1 data-default-instances-old-locale-0.0.1 data-default-instances-dlist-0.0.1 data-default-instances-containers-0.0.1) (new package) dlist-0.8.0.2 (latest: 0.8.0.3) (via: aeson-0.11.3.0 data-default-instances-dlist-0.0.1) (new package) hourglass-0.2.10 (via: x509-validation-1.6.5 x509-1.6.5 asn1-encoding-0.9.5 asn1-types-0.3.2) (new package) memory-0.13 (latest: 0.14.8) (via: tls-1.3.10 x509-validation-1.6.5 x509-1.6.5 cryptohash-0.11.9 asn1-types-0.3.2 cryptonite-0.21) (new package) mtl-2.2.1 (via: machines-0.6.2 http-conduit-2.1.11 lens-4.14 kan-extensions-5.0.2 apply-refact-0.3.0.0 apply-refact-0.3.0.0 adjunctions-4.3 either-4.4.1.1 ghc-exactprint-0.5.3.1 tls-1.3.10 free-4.12.4 x509-system-1.6.4 x509-validation-1.6.5 conduit-1.2.10 x509-store-1.6.2 resourcet-1.1.9 aeson-0.11.3.0 hscope-0.4.3 pointful-1.0.8 pointful-1.0.8 MissingH-1.4.0.1 x509-1.6.5 json-0.9.1 pure-cdb-0.1.2 filemanip-0.3.6.3 MonadRandom-0.4.2.3 exceptions-0.8.3 mmorph-1.0.9 parsec-3.1.11 hslogger-1.2.10 pem-0.2.2 regex-base-0.93.2) (new package) network-2.6.3.1 (latest: 2.6.3.2) (via: codex-0.5.1.2 hoogle-5.0.1 http-client-tls-0.2.4.1 connection-0.2.8 warp-tls-3.2.3 tls-1.3.10 conduit-extra-1.1.16 wai-logger-2.3.0 warp-3.2.12 http-client-0.4.31.2 wai-3.2.1.1 MissingH-1.4.0.1 network-uri-flag-0.1 streaming-commons-0.1.17 hslogger-1.2.10 iproute-1.7.1 simple-sendfile-0.2.25 socks-0.5.5) (new package) old-locale-1.0.0.7 (via: hoogle-5.0.1 MissingH-1.4.0.1 cookie-0.4.2.1 cpphs-1.20.5 cpphs-1.20.5 data-default-instances-old-locale-0.0.1 hslogger-1.2.10 old-time-1.1.0.3) (new package) primitive-0.6.1.0 (latest: 0.6.2.0) (via: conduit-extra-1.1.16 conduit-1.2.10 tf-random-0.5 vector-0.11.0.0) (new package) random-1.1 (via: authenticate-oauth-1.5.1.2 http-client-0.4.31.2 MissingH-1.4.0.1 streaming-commons-0.1.17 QuickCheck-2.8.2 MonadRandom-0.4.2.3 tf-random-0.5) (new package) (new package) semigroups-0.18.3 (via: machines-0.6.2 lens-4.14 pointed-5 adjunctions-4.3 either-4.4.1.1 free-4.12.4 yaml-0.8.23 semigroupoids-5.1 bifunctors-5.4.2 comonad-5.0.1 contravariant-1.4 chunked-data-0.3.0) (new package) stm-2.4.4.1 (via: pointed-5 conduit-extra-1.1.16 warp-3.2.12 http2-1.6.2 concurrent-output-1.7.9 monad-control-1.0.1.0 streaming-commons-0.1.17 exceptions-0.8.3 transformers-base-0.4.4 StateVar-1.1.0.4 async-2.1.1.1) (new package) syb-0.6 (latest: 0.7) (via: apply-refact-0.3.0.0 apply-refact-0.3.0.0 ghc-exactprint-0.5.3.1 aeson-0.11.3.0 pointful-1.0.8 pointful-1.0.8 uniplate-1.6.12 json-0.9.1) (new package) text-1.2.2.2 (via: codex-0.5.1.2 wreq-0.4.1.0 hoogle-5.0.1 lens-aeson-1.0.1 lens-4.14 conduit-extra-1.1.16 yaml-0.8.23 warp-3.2.12 http-client-0.4.31.2 wai-3.2.1.1 aeson-0.11.3.0 http-types-0.9.1 attoparsec-0.13.1.0 fast-logger-2.4.10 concurrent-output-1.7.9 cookie-0.4.2.1 streaming-commons-0.1.17 case-insensitive-1.2.0.9 scientific-0.3.4.9 json-0.9.1 chunked-data-0.3.0 blaze-builder-0.4.0.2 hashable-1.2.4.0 mime-types-0.1.0.7 parsec-3.1.11 polyparse-1.12) (new package) transformers-compat-0.5.1.4 (via: machines-0.6.2 lens-4.14 pointed-5 adjunctions-4.3 free-4.12.4 semigroupoids-5.1 bifunctors-5.4.2 resourcet-1.1.9 comonad-5.0.1 distributive-0.5.2 monad-control-1.0.1.0 contravariant-1.4 optparse-applicative-0.12.1.0 MonadRandom-0.4.2.3 exceptions-0.8.3 mmorph-1.0.9 tagged-0.8.5 transformers-base-0.4.4) (new package) unix-compat-0.4.3.1 (via: apply-refact-0.3.0.0 apply-refact-0.3.0.0 warp-3.2.12 filemanip-0.3.6.3) (new package) utf8-string-1.0.1.1 (via: hoogle-5.0.1 hasktags-0.69.3 hackage-db-1.22) (new package) (new package) zlib-0.6.1.2 (via: codex-0.5.1.2 hoogle-5.0.1 streaming-commons-0.1.17) (new package) cabal-doctest-1.0.2 (via: lens-aeson-1.0.1 machines-0.6.2 comonad-5.0.1 distributive-0.5.2) (new package) (new package) data-default-instances-containers-0.0.1 (via: data-default-0.7.1.1) (new package) cryptonite-0.21 (latest: 0.24) (via: warp-tls-3.2.3 tls-1.3.10 x509-validation-1.6.5 x509-store-1.6.2 x509-1.6.5 cryptohash-0.11.9) (new package) asn1-types-0.3.2 (via: tls-1.3.10 x509-validation-1.6.5 x509-store-1.6.2 x509-1.6.5 asn1-parse-0.9.4 crypto-pubkey-types-0.4.3 asn1-encoding-0.9.5) (new package) pem-0.2.2 (via: x509-system-1.6.4 x509-validation-1.6.5 x509-store-1.6.2 x509-1.6.5) (new package) old-time-1.1.0.3 (via: MissingH-1.4.0.1 cpphs-1.20.5 cpphs-1.20.5 unix-time-0.3.7) (new package) data-default-instances-old-locale-0.0.1 (via: data-default-0.7.1.1) (new package) vector-0.11.0.0 (latest: 0.12.0.1) (via: hoogle-5.0.1 lens-aeson-1.0.1 lens-4.14 yaml-0.8.23 aeson-0.11.3.0 hscope-0.4.3 scientific-0.3.4.9 chunked-data-0.3.0 pure-cdb-0.1.2) (new package) async-2.1.1.1 (via: tls-1.3.10 conduit-extra-1.1.16 warp-3.2.12 ascii-progress-0.3.3.0 concurrent-output-1.7.9 streaming-commons-0.1.17) (new package) parsec-3.1.11 (via: MissingH-1.4.0.1 json-0.9.1 network-uri-2.6.1.0) (new package) hashable-1.2.4.0 (latest: 1.2.6.1) (via: wreq-0.4.1.0 lens-4.14 pointed-5 warp-3.2.12 aeson-0.11.3.0 uniplate-1.6.12 vault-0.3.0.7 case-insensitive-1.2.0.9 psqueues-0.2.2.3 scientific-0.3.4.9 unordered-containers-0.2.8.0) (new package) blaze-builder-0.4.0.2 (via: conduit-extra-1.1.16 authenticate-oauth-1.5.1.2 wai-logger-2.3.0 warp-3.2.12 http-client-0.4.31.2 wai-3.2.1.1 http-types-0.9.1 cookie-0.4.2.1 streaming-commons-0.1.17) (new package) transformers-base-0.4.4 (via: either-4.4.1.1 conduit-extra-1.1.16 conduit-1.2.10 resourcet-1.1.9 lifted-base-0.2.3.10 monad-control-1.0.1.0) (new package) tagged-0.8.5 (via: lens-4.14 pointed-5 kan-extensions-5.0.2 adjunctions-4.3 profunctors-5.2 semigroupoids-5.1 bifunctors-5.4.2 aeson-0.11.3.0 pureMD5-2.1.3 comonad-5.0.1 crypto-api-0.13.2 distributive-0.5.2) (new package) mmorph-1.0.9 (latest: 1.1.0) (via: either-4.4.1.1 conduit-1.2.10 resourcet-1.1.9) (new package) exceptions-0.8.3 (via: wreq-0.4.1.0 http-conduit-2.1.11 lens-4.14 either-4.4.1.1 free-4.12.4 conduit-extra-1.1.16 conduit-1.2.10 resourcet-1.1.9 http-client-0.4.31.2 concurrent-output-1.7.9 temporary-1.2.0.4) (new package) filemanip-0.3.6.3 (via: apply-refact-0.3.0.0 apply-refact-0.3.0.0) (new package) (new package) asn1-encoding-0.9.5 (via: tls-1.3.10 x509-validation-1.6.5 x509-store-1.6.2 x509-1.6.5 asn1-parse-0.9.4 crypto-pubkey-types-0.4.3) (new package) (new package) contravariant-1.4 (via: lens-4.14 kan-extensions-5.0.2 adjunctions-4.3 profunctors-5.2 semigroupoids-5.1 comonad-5.0.1) (new package) cpphs-1.20.5 (latest: 1.20.8) (via: hlint-1.9.35 hscope-0.4.3 haskell-src-exts-1.17.1) (new package) network-uri-2.6.1.0 (via: hoogle-5.0.1 http-client-0.4.31.2 network-uri-flag-0.1) (new package) unordered-containers-0.2.8.0 (via: wreq-0.4.1.0 lens-aeson-1.0.1 lens-4.14 pointed-5 yaml-0.8.23 aeson-0.11.3.0 uniplate-1.6.12 vault-0.3.0.7) (new package) scientific-0.3.4.9 (latest: 0.3.5.2) (via: lens-aeson-1.0.1 yaml-0.8.23 aeson-0.11.3.0 attoparsec-0.13.1.0) (new package) psqueues-0.2.2.3 (latest: 0.2.3.0) (via: wreq-0.4.1.0 http2-1.6.2) (new package) case-insensitive-1.2.0.9 (latest: 1.2.0.10) (via: wreq-0.4.1.0 wai-logger-2.3.0 warp-3.2.12 http-client-0.4.31.2 http-types-0.9.1 http2-1.6.2) (new package) streaming-commons-0.1.17 (latest: 0.1.18) (via: warp-tls-3.2.3 conduit-extra-1.1.16 warp-3.2.12 http-client-0.4.31.2) (new package) monad-control-1.0.1.0 (latest: 1.0.2.2) (via: http-conduit-2.1.11 either-4.4.1.1 conduit-extra-1.1.16 conduit-1.2.10 resourcet-1.1.9 lifted-base-0.2.3.10) (new package) distributive-0.5.2 (latest: 0.5.3) (via: machines-0.6.2 lens-4.14 kan-extensions-5.0.2 adjunctions-4.3 free-4.12.4 profunctors-5.2 semigroupoids-5.1 comonad-5.0.1) (new package) temporary-1.2.0.4 (latest: 1.2.1.1) (via: apply-refact-0.3.0.0 apply-refact-0.3.0.0) (new package) concurrent-output-1.7.9 (latest: 1.10.0) (via: ascii-progress-0.3.3.0) (new package) crypto-pubkey-types-0.4.3 (via: authenticate-oauth-1.5.1.2 RSA-2.2.0) (new package) haskell-src-exts-1.17.1 (latest: 1.19.1) (via: hoogle-5.0.1 hlint-1.9.35 hscope-0.4.3 pointfree-1.1.1.2 pointfree-1.1.1.2 pointful-1.0.8 pointful-1.0.8) (new package) attoparsec-0.13.1.0 (latest: 0.13.2.0) (via: wreq-0.4.1.0 lens-aeson-1.0.1 conduit-extra-1.1.16 yaml-0.8.23 aeson-0.11.3.0 http-date-0.0.6.1) (new package) http-types-0.9.1 (via: wreq-0.4.1.0 hoogle-5.0.1 http-conduit-2.1.11 authenticate-oauth-1.5.1.2 wai-logger-2.3.0 warp-3.2.12 http-client-0.4.31.2 wai-3.2.1.1) (new package) lifted-base-0.2.3.10 (latest: 0.2.3.11) (via: http-conduit-2.1.11 conduit-1.2.10 resourcet-1.1.9) (new package) comonad-5.0.1 (latest: 5.0.2) (via: machines-0.6.2 lens-4.14 pointed-5 kan-extensions-5.0.2 adjunctions-4.3 free-4.12.4 profunctors-5.2 semigroupoids-5.1 bifunctors-5.4.2) (new package) x509-1.6.5 (latest: 1.7.2) (via: connection-0.2.8 tls-1.3.10 x509-system-1.6.4 x509-validation-1.6.5 x509-store-1.6.2) (new package) aeson-0.11.3.0 (latest: 1.2.2.0) (via: wreq-0.4.1.0 hoogle-5.0.1 lens-aeson-1.0.1 http-conduit-2.1.11 yaml-0.8.23 yaml-0.8.23 yaml-0.8.23) (new package) (new package) http-client-0.4.31.2 (latest: 0.5.7.0) (via: codex-0.5.1.2 wreq-0.4.1.0 http-conduit-2.1.11 http-client-tls-0.2.4.1 authenticate-oauth-1.5.1.2) (new package) resourcet-1.1.9 (via: hoogle-5.0.1 http-conduit-2.1.11 conduit-extra-1.1.16 yaml-0.8.23 conduit-1.2.10) (new package) bifunctors-5.4.2 (via: lens-4.14 either-4.4.1.1 free-4.12.4 profunctors-5.2 semigroupoids-5.1) (new package) x509-store-1.6.2 (latest: 1.6.5) (via: connection-0.2.8 tls-1.3.10 x509-system-1.6.4 x509-validation-1.6.5) (new package) conduit-1.2.10 (latest: 1.2.12) (via: hoogle-5.0.1 http-conduit-2.1.11 conduit-extra-1.1.16 yaml-0.8.23) (new package) semigroupoids-5.1 (latest: 5.2.1) (via: machines-0.6.2 lens-4.14 pointed-5 kan-extensions-5.0.2 adjunctions-4.3 either-4.4.1.1 free-4.12.4) (new package) profunctors-5.2 (latest: 5.2.1) (via: machines-0.6.2 lens-4.14 adjunctions-4.3 either-4.4.1.1 free-4.12.4) (new package) x509-validation-1.6.5 (latest: 1.6.9) (via: connection-0.2.8 tls-1.3.10) (new package) yaml-0.8.23 (latest: 0.8.23.3) (via: codex-0.5.1.2 codex-0.5.1.2) (new package) (new package) free-4.12.4 (via: lens-4.14 kan-extensions-5.0.2 adjunctions-4.3 either-4.4.1.1 ghc-exactprint-0.5.3.1) (new package) tls-1.3.10 (latest: 1.4.0) (via: http-client-tls-0.2.4.1 connection-0.2.8 warp-tls-3.2.3) (new package) ghc-exactprint-0.5.3.1 (latest: 0.5.5.0) (via: apply-refact-0.3.0.0 apply-refact-0.3.0.0) (new package) apply-refact-0.3.0.0 (latest: 0.4.1.0) (via: dependencies-0.1.0.0) (new package) http-client-tls-0.2.4.1 (latest: 0.3.5.1) (via: wreq-0.4.1.0 http-conduit-2.1.11) (new package) (new package) machines-0.6.2 (latest: 0.6.3) (via: codex-0.5.1.2 machines-directory-0.2.1.0 machines-io-0.2.0.13) (new package) wreq-0.4.1.0 (latest: 0.5.1.0) (via: codex-0.5.1.2 codex-0.5.1.2) (new package) CallStack (from HasCallStack): error, called at src/Stack/Solver.hs:187:16 in stack-1.5.1-AuJjJx1aJxY5PeGr3Rk8lL:Stack.Solver "stack init --solver --install-ghc" failed with error 1 setup_haskell.hs failed with error 1. Aborting...

begriffs commented 6 years ago

Would you like to force a sync? THIS WILL REMOVE ANY LOCAL CHANGES! [y/N]: N

This line makes me wonder if there are any local changes that might be affecting the build. Did you basically install it once, run into the problem, then run the installer again to capture the output? Then you chose "N" basically because nothing had changed between runs?

Warning: Installed version of cabal-install (2.0.0.0) is newer than stack has been tested with. If you run into difficulties, consider downgrading.

I haven't tried the installer with cabal-install 2 yet, so there could be a possible incompatibility. Seeing The following lines from cabal-install output could not be parsed makes me even more suspicious. Can you try running the installer on a fresh machine either on Docker or Digital Ocean or something that has cabal-install 2? Perhaps that will reproduce the problem.

tmspzz commented 6 years ago

same here

"stack --resolver lts-7.9 install ghc-mod --install-ghc --verbosity warning" failed with error 1
*** setup_haskell.hs failed with error 1.
*** Aborting...

if I run

$ stack --resolver lts-7.9 install ghc-mod --install-ghc --verbosity warning
$ echo $?
0

EDIT: I edited the script and got:

Setting up GHC if needed...
    Stack bin path: /Users/blender/.local/bin
    Stack global path: /Users/blender/.stack
    Stack global config location: /Users/blender/.stack/global-project/stack.yaml
    Stack resolver: lts-7.9
    /Users/blender/.config/haskell-vim-now/.stack-bin -> /Users/blender/.local/bin
Installing helper binaries...
    stack --resolver lts-7.9 install ghc-mod --install-ghc --verbosity warning
Plan construction failed.

Edit: the stack --resolver ... command fails if run not in a stack project directory. For example if I run stack --resolver lts-7.9 install ghc-mod --install-ghc --verbosity warning in my home dir it fails. If I run it in a project dir it succeeds .

jship commented 6 years ago

I'd like to play around with this one when I get a chance. Please feel free to assign to me if you'd like. Definitely seems like it could be a cabal 2 thing.

jship commented 6 years ago

@i-schuetz & @blender: Would you please locate the stack root directory on your machines via:

stack --verbosity 0 path --stack-root

Then from that dir, open up global-project/stack.yaml and let us know the resolver version that is in that file?

tmspzz commented 6 years ago
$ stack --verbosity 0 path --stack-root | xargs -I dir cat dir/global-project/stack.yaml
# This is the implicit global project's config file, which is only used when
# 'stack' is run outside of a real project.  Settings here do _not_ act as
# defaults for all projects.  To change stack's default settings, edit
# '/Users/blender/.stack/config.yaml' instead.
#
# For more information about stack's configuration, see
# https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
#
flags: {}
extra-package-dbs: []
packages: []
extra-deps: [cabal-helper-0.6.1.0, pure-cdb-0.1.1]
resolver: lts-9.11
jship commented 6 years ago

Thank you, @blender. What about:

cabal --version
stack --version

If you have cabal 2 and that's what might be biting us here, we can try a clean VM that forces usage of cabal 2.

As a side note, seeing the extra-deps: [cabal-helper-0.6.1.0, pure-cdb-0.1.1] is a decent indicator the problem could be stemming from the state your system is in from an older run of the haskell-vim-now installer. In a reasonably older version of haskell-vim-now, it had to do some stack.yaml weirdness for pinning down pure-cdb. I believe that was a transitive dependency or something. It is no longer needed.

Not that it matters/is bad if pure-cdb is in your global stack config - just a callout that it's possible the changes that have been made to haskell-vim-now are not backwards compatible with older installs.


Update: For reference, here's some comments from a year or two ago about pure-cdb:

tmspzz commented 6 years ago
$ cabal --version
-bash: cabal: command not found
$ stack --version
Version 1.5.1 x86_64 hpack-0.17.1
tmspzz commented 6 years ago

Well, apparently something does make a difference.

I removed the extra-deps and run bash /tmp/haskell-vim-now.sh (I think previously I was running just /tmp/haskell-vim-now.sh and it got somewhat further. Note that I put some debug prints around where it was stopping previously

$ bash /tmp/haskell-vim-now.sh
--> Existing Haskell-Vim-Now installation detected at /Users/blender/.config/haskell-vim-now.
--- Syncing Haskell-Vim-Now with upstream...
--- No new packages needed for install...
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Testing for broken Ruby interface in vim...
--- Test passed. Ruby interface is OK.
--- Backing up current vim config using timestamp 20171110_102428...
    /Users/blender/.config/haskell-vim-now/backup/.vim.20171110_102428
    /Users/blender/.config/haskell-vim-now/backup/.vimrc.20171110_102428
--- Creating vim config symlinks
    ~/.vimrc -> /Users/blender/.config/haskell-vim-now/.vimrc
    ~/.vim   -> /Users/blender/.config/haskell-vim-now/.vim
--- Installing plugins using vim-plug...
HERE
/Users/blender/.config/haskell-vim-now/scripts/setup_haskell.hs
HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False}
Setting up GHC if needed...
FilePath "/Users/blender/.stack/global-project/stack.yaml"
Just (Line "resolver: lts-9.11")
"lts-9.11"
    Stack bin path: /Users/blender/.local/bin
    Stack global path: /Users/blender/.stack
    Stack global config location: /Users/blender/.stack/global-project/stack.yaml
    Stack resolver: lts-9.11
    /Users/blender/.config/haskell-vim-now/.stack-bin -> /Users/blender/.local/bin
Installing helper binaries...
    stack --resolver lts-9.11 install ghc-mod --install-ghc --verbosity warning
    stack --resolver lts-9.11 install cabal-install --install-ghc --verbosity warning
Completed 7 action(s).
    stack --resolver lts-8.14 install hindent --install-ghc --verbosity warning
Completed 19 action(s).
name:                dependencies
version:             0.1.0.0
synopsis:            helper binaries for vim
homepage:            https://github.com/begriffs/haskell-vim-now
license:             MIT
author:              Joe Nelson
maintainer:          cred+github@begriffs.com
category:            Development
build-type:          Simple
cabal-version:       >=1.10

library
  build-depends:       base >=4.9 && <4.10
                     , apply-refact
                     , codex
                     , hasktags
                     , hlint
                     , hoogle
                     , hscope
                     , pointfree
                     , pointful
  default-language:    Haskell2010
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- dependencies.cabal

Selecting the best among 11 snapshots...

Downloaded lts-9.12 build plan.
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Updating index
Updated package list downloaded
Populated index cache.
* Partially matches lts-9.12
    apply-refact not found
        - dependencies requires -any
    codex not found
        - dependencies requires -any
    hasktags not found
        - dependencies requires -any
    hscope not found
        - dependencies requires -any
    pointfree not found
        - dependencies requires -any

Downloaded nightly-2017-11-10 build plan.
* Rejected nightly-2017-11-10
    ghc-8.2.1 cannot be used for these packages:
        - dependencies
    base version 4.10.0.0 found
        - dependencies requires >=4.9 && <4.10

Downloaded lts-8.24 build plan.
* Partially matches lts-8.24
    apply-refact not found
        - dependencies requires -any
    codex not found
        - dependencies requires -any
    hasktags not found
        - dependencies requires -any
    hscope not found
        - dependencies requires -any
    pointfree not found
        - dependencies requires -any

Downloaded lts-7.24 build plan.
* Partially matches lts-7.24
    codex not found
        - dependencies requires -any
    hasktags not found
        - dependencies requires -any
    hscope not found
        - dependencies requires -any
    pointfree not found
        - dependencies requires -any

Downloaded lts-6.35 build plan.
* Rejected lts-6.35
    ghc-7.10.3 cannot be used for these packages:
        - dependencies
    base version 4.8.2.0 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-5.18
    ghc-7.10.3 cannot be used for these packages:
        - dependencies
    base version 4.8.2.0 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-4.2
    ghc-7.10.3 cannot be used for these packages:
        - dependencies
    base version 4.8.2.0 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-3.22
    ghc-7.10.2 cannot be used for these packages:
        - dependencies
    base version 4.8.1.0 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-2.22
    ghc-7.8.4 cannot be used for these packages:
        - dependencies
    base version 4.7.0.2 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-1.15
    ghc-7.8.4 cannot be used for these packages:
        - dependencies
    base version 4.7.0.2 found
        - dependencies requires >=4.9 && <4.10

* Rejected lts-0.7
    ghc-7.8.3 cannot be used for these packages:
        - dependencies
    base version 4.7.0.1 found
        - dependencies requires >=4.9 && <4.10

Selected resolver: lts-7.24
*** Resolver lts-7.24 will need external packages:
    codex not found
        - dependencies requires -any
    hasktags not found
        - dependencies requires -any
    hscope not found
        - dependencies requires -any
    pointfree not found
        - dependencies requires -any

Using resolver: lts-7.24
Solver requires that cabal be on your PATH
Try running 'stack install cabal-install'

"stack init --solver --install-ghc" failed with error 1
OK
*** setup_haskell.hs failed with error 1.
*** Aborting...
harendra-kumar commented 6 years ago

setup_haskell.hs failed for me as well. I have lts-8.23 as my default global stack resolver. So cabal-install is installed with that resolver. However, the solver picks a resolver that needs cabal-2:

Downloaded nightly-2017-11-17 build plan.    
Unable to parse cabal file: FromString "This package requires at least Cabal version 2.0" Nothing

cueball:~ $ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library 

We need to make sure that the cabal we install and the cabal that the chosen resolver needs are compatible.

I propose that we use the --resolver option during solving to pin the resolver for the solver, to the default global resolver. Once we do that the solver may solve it with some extra dependencies in the stack.yaml. We can then install all these binaries with the solver generated stack.yaml instead of choosing a resolver that can satisfy all these deps without extra-deps. It is possible that none of the resolver can satisfy what we want without extra-deps. Therefore building with a solver generated stack.yaml is a more predictable option.

Another problem is that this install overwrites the already installed binaries in .local/bin without asking the user and it may throw surprises to the user later. We should instead not install what is already installed. That has two fold advantages, 1) we do not break a user's setup by silently changing a binary 2) users can pre-install these binaries to avoid any install problems like the one we are dealing with in this issue.