Closed jship closed 6 years ago
I haven't used ghc-mod
in a while. I'd be inclined to remove ghc-mod
from haskell-vim-now
since it is tricky to get right (and in this case, build) with the current versions of GHC. That would be a fourth option.
Hmm, for me doing identifier completions and querying types under the cursor is really important.
How about in the short term we go with your option 2? I'm also curious whether viable ghc-mod replacements exist.
As a new user, this has been very frustrating. I had high hopes for this when I first came across it. Wish there was at least some kind of workaround mentioned in the docs because it is evident a lot of users are having this issue.
Hi @bidhan-a, I am a bit strapped for OSS time at the moment. Would you be interested in submitting a PR for this? I would be happy to help guide you to the spots in the code we could change.
As a start, in setup_haskell.hs
, we would need the stackInstall
function to not kill the whole install run on failure. This could be passed in as a flag to stackInstall
, because we probably still want the install run to die on other things we stackInstall
, but for the ghc-mod
install, we'd like to keep the installer going on failure.
Hi @jship ,
I'd be glad to help out in any way I can since I'm really looking forward to making it work on my machine.
As per your suggestion, I have modified the stackInstall
function to take a flag as an argument. Please review the code here if possible and let me know if I need to add anything else.
I have tested the modified script and the installer successfully moves past that point, but unfortunately it exits with another error after a while. The error looks similar to the one described in 278 and 270. Here's the complete log if it helps:
./install.sh --repo https://github.com/bidhan-a/haskell-vim-now.git --branch ghc-mod-flag
--> Existing Haskell-Vim-Now installation detected at /home/bidhan/.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]: y
HEAD is now at 018f557 Add exitOnFailure flag to the stackInstall function
Current branch ghc-mod-flag is up to date.
--- Installing system packages [libcurl4-openssl-dev] using [APT]...
--- Installing with apt-get...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping libcurl4-openssl-dev, it is already installed and upgrade is not set.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Backing up current vim config using timestamp 20180204_152541...
/home/bidhan/.config/haskell-vim-now/backup/.vim.20180204_152541
/home/bidhan/.config/haskell-vim-now/backup/.vimrc.20180204_152541
--- Creating vim config symlinks
~/.vimrc -> /home/bidhan/.config/haskell-vim-now/.vimrc
~/.vim -> /home/bidhan/.config/haskell-vim-now/.vim
--- Installing plugins using vim-plug...
Downloaded lts-8.14 build plan.
Downloaded ghc-8.0.2.
Installed GHC.
Update complete
Populated index cache.
[1 of 2] Compiling Main ( /home/bidhan/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/bidhan/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim ( /home/bidhan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/bidhan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /home/bidhan/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 ...
Completed 49 action(s).
HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False}
Setting up GHC if needed...
Downloaded lts-10.4 build plan.
Downloaded ghc-8.2.2.
Installed GHC.
Stack bin path: /home/bidhan/.local/bin
Stack global path: /home/bidhan/.stack
Stack global config location: /home/bidhan/.stack/global-project/stack.yaml
Stack resolver: lts-10.4
/home/bidhan/.config/haskell-vim-now/.stack-bin -> /home/bidhan/.local/bin
Installing helper binaries...
stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning
Plan construction failed.
"stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning" failed with error 1
stack --resolver lts-10.4 install cabal-install --install-ghc --verbosity warning
[1 of 2] Compiling Main ( /home/bidhan/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /home/bidhan/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim ( /home/bidhan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /home/bidhan/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /home/bidhan/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 ...
Completed 21 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:
- ./
Selecting the best among 12 snapshots...
* Rejected lts-10.4
ghc-8.2.2 cannot be used for these packages:
- dependencies
base version 4.10.1.0 found
- dependencies requires >=4.9 && <4.10
Downloaded nightly-2018-01-29 build plan.
* Rejected nightly-2018-01-29
ghc-8.2.2 cannot be used for these packages:
- dependencies
base version 4.10.1.0 found
- dependencies requires >=4.9 && <4.10
Downloaded lts-9.21 build plan.
* Partially matches lts-9.21
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-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
Downloaded lts-5.18 build plan.
* 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
Downloaded lts-4.2 build plan.
* 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
Downloaded lts-3.22 build plan.
* 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
Downloaded lts-2.22 build plan.
* 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
Downloaded lts-1.15 build plan.
* 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
Downloaded lts-0.7 build plan.
* 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
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.0.1.
Installed GHC.
Warning: Installed version of cabal-install (2.0.0.1) 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.1.1) (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.6 entropy-0.3.7 ghc-paths-0.1.0.9) (new
version)
ansi-terminal-0.6.3 (latest: 0.8.0.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 (latest: 0.5.5.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)
cmdargs-0.10.17 (latest: 0.10.20) (via: hoogle-5.0.1 hlint-1.9.35) (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.4) (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.14) (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.3) (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.3.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 (latest: 0.18.4) (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 (latest: 2.4.5.0) (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 (latest: 1.2.3.0) (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 (latest: 0.5.0.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.4 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.6 (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 (latest: 3.1.12.0) (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 (latest: 1.4.1) (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.5.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.19) (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)
crypto-api-0.13.2 (latest: 0.13.3) (via: RSA-2.2.0 pureMD5-2.1.3) (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.2) (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.20.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.2) (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 (latest: 0.12.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.4.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.10) (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 (latest: 1.2.0) (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 (latest: 5.5) (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.3.0) (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.2) (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.2) (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)
(new package)
free-4.12.4 (latest: 5) (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.6.0) (via: apply-refact-0.3.0.0
apply-refact-0.3.0.0) (new package)
adjunctions-4.3 (latest: 4.4) (via: machines-0.6.2 kan-extensions-5.0.2) (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.2) (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.2.0) (via: codex-0.5.1.2 codex-0.5.1.2) (new
package)
CallStack (from HasCallStack):
error, called at src/Stack/Solver.hs:173:16 in stack-1.6.3-29yGLWFZzMc4kc0GGcUpok:Stack.Solver
"stack init --solver --install-ghc" failed with error 1
*** setup_haskell.hs failed with error 1.
*** Aborting...
Any way I can get around this one? I have the latest version of Stack by the way.
Thanks.
Nice, @bidhan-a! I have a feeling getting #276 merged will get you past this error. I'll merge that PR in.
As far things to add, we'll probably want to let the user know about a link or two they can go to so they can manually install ghc-mod
if our attempted install fails.
Hi @jship ,
Still no luck. I'm getting a similar error even after merging #276 .
./install.sh --repo https://github.com/bidhan-a/haskell-vim-now.git --branch ghc-mod-flag
--> Existing Haskell-Vim-Now installation detected at /home/bidhan/.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]: y
HEAD is now at 5ac000e Add typeclass constraint to handleFailure
Current branch ghc-mod-flag is up to date.
--- Installing system packages [libcurl4-openssl-dev] using [APT]...
--- Installing with apt-get...
[sudo] password for bidhan:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping libcurl4-openssl-dev, it is already installed and upgrade is not set.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Backing up current vim config using timestamp 20180206_204811...
/home/bidhan/.config/haskell-vim-now/backup/.vim.20180206_204811
/home/bidhan/.config/haskell-vim-now/backup/.vimrc.20180206_204811
--- Creating vim config symlinks
~/.vimrc -> /home/bidhan/.config/haskell-vim-now/.vimrc
~/.vim -> /home/bidhan/.config/haskell-vim-now/.vim
--- Installing plugins using vim-plug...
HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False}
Setting up GHC if needed...
Stack bin path: /home/bidhan/.local/bin
Stack global path: /home/bidhan/.stack
Stack global config location: /home/bidhan/.stack/global-project/stack.yaml
Stack resolver: lts-10.4
/home/bidhan/.config/haskell-vim-now/.stack-bin -> /home/bidhan/.local/bin
Installing helper binaries...
stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning
Plan construction failed.
"stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning" failed with error 1
To install "ghc-mod" manually, see here: https://github.com/DanielG/ghc-mod/issues/900
stack --resolver lts-10.4 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
-- hscope 0.4 does not compile with most resolvers so use newer
build-depends: base >=4.9 && <4.10
, hscope > 0.4
, apply-refact
, codex
, hasktags
, hlint
, hoogle
, pointfree
, pointful
default-language: Haskell2010
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selected resolver: lts-10.4
Resolver 'lts-10.4' does not have a matching compiler to build some or all of your package(s).
ghc-8.2.2 cannot be used for these packages:
- dependencies
base version 4.10.1.0 found
- dependencies requires >=4.9 && <4.10
This may be resolved by:
- Using '--omit-packages to exclude mismatching package(s).
- Using '--resolver' to specify a matching snapshot/resolver
"stack init --solver --resolver lts-10.4 --install-ghc" failed with error 1
*** setup_haskell.hs failed with error 1.
*** Aborting...
It seems the problem is with the "hscope" library this time.
On a side note, I've included the following URL as a reference for the user in case they want to manually install ghc-mod.
Thanks!
Looks like the upper bound on base
is too restrictive in our auto-generated .cabal file for the helper binaries. Mind changing this line's 4.10
upper bound to be 4.11
?
GHC 8.2.2's bundled base
package is version 4.10.1.0.
I'm getting the following error now, similar to the one described in #270 .
./install.sh --repo https://github.com/bidhan-a/haskell-vim-now.git --branch ghc-mod-flag
--> Existing Haskell-Vim-Now installation detected at /home/bidhan/.config/haskell-vim-now.
--- Syncing Haskell-Vim-Now with upstream...
Current branch ghc-mod-flag is up to date.
--- Installing system packages [libcurl4-openssl-dev] using [APT]...
--- Installing with apt-get...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping libcurl4-openssl-dev, it is already installed and upgrade is not set.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Installing vim-plug
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (35) gnutls_handshake() failed: Error in the pull function.
*** Failed to install vim-plug.
*** Please report at https://github.com/begriffs/haskell-vim-now/issues
*** Aborting...
➜ haskell-vim-now git:(ghc-mod-flag) ./install.sh --repo https://github.com/bidhan-a/haskell-vim-now.git --branch ghc-mod-flag
--> No previous installations detected.
--- Installing Haskell-Vim-Now from https://github.com/bidhan-a/haskell-vim-now.git ...
Cloning into '/home/bidhan/.config/haskell-vim-now'...
remote: Counting objects: 1066, done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 1066 (delta 12), reused 15 (delta 6), pack-reused 1045
Receiving objects: 100% (1066/1066), 365.22 KiB | 68.00 KiB/s, done.
Resolving deltas: 100% (651/651), done.
Checking connectivity... done.
--- Installing system packages [libcurl4-openssl-dev] using [APT]...
--- Installing with apt-get...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Skipping libcurl4-openssl-dev, it is already installed and upgrade is not set.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
--- Checking ctags' exuberance...
--- Setting git to use fully-pathed vim for messages...
--- Installing vim-plug
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73745 100 73745 0 0 46207 0 0:00:01 0:00:01 --:--:-- 46235
--- Backing up current vim config using timestamp 20180206_230326...
/home/bidhan/.config/haskell-vim-now/backup/.vim.20180206_230326
/home/bidhan/.config/haskell-vim-now/backup/.vimrc.20180206_230326
--- Creating vim config symlinks
~/.vimrc -> /home/bidhan/.config/haskell-vim-now/.vimrc
~/.vim -> /home/bidhan/.config/haskell-vim-now/.vim
--- Installing plugins using vim-plug...
make -f make_unix.mak
make[1]: Entering directory '/home/bidhan/.config/haskell-vim-now/.vim/bundle/vimproc.vim'
cc -W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC -o lib/vimproc_linux64.so src/proc.c -lutil
make[1]: Leaving directory '/home/bidhan/.config/haskell-vim-now/.vim/bundle/vimproc.vim'
HvnArgs {hvnArgsNoHoogleDb = False, hvnArgsNoHelperBinaries = False}
Setting up GHC if needed...
Stack bin path: /home/bidhan/.local/bin
Stack global path: /home/bidhan/.stack
Stack global config location: /home/bidhan/.stack/global-project/stack.yaml
Stack resolver: lts-10.4
/home/bidhan/.config/haskell-vim-now/.stack-bin -> /home/bidhan/.local/bin
Installing helper binaries...
stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning
Plan construction failed.
"stack --resolver lts-10.4 install ghc-mod --install-ghc --verbosity warning" failed with error 1
To install "ghc-mod" manually, see here: https://github.com/DanielG/ghc-mod/issues/900
stack --resolver lts-10.4 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
-- hscope 0.4 does not compile with most resolvers so use newer
build-depends: base >=4.9 && <4.11
, hscope > 0.4
, apply-refact
, codex
, hasktags
, hlint
, hoogle
, pointfree
, pointful
default-language: Haskell2010
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selected resolver: lts-10.4
*** Resolver lts-10.4 will need external packages:
codex not found
- dependencies requires -any
hasktags not found
- dependencies requires -any
hscope not found
- dependencies requires >0.4
pointfree not found
- dependencies requires -any
Using resolver: lts-10.4
Warning: Installed version of cabal-install (2.0.0.1) is newer than stack has been tested with. If you run into difficulties, consider downgrading.
Using compiler: ghc-8.2.2
Asking cabal to calculate a build plan...
Trying with packages from lts-10.4 as hard constraints...
Attempt failed.
>>>> Cabal errors begin
CallStack (from HasCallStack):
die', called at ./Distribution/Client/Install.hs:240:21 in main:Distribution.Client.Install
cabal: Could not resolve dependencies:
trying: dependencies-0.1.0.0 (user goal)
trying: base-4.10.1.0/installed-4.1... (dependency of dependencies-0.1.0.0)
trying: ghc-8.2.2/installed-8.2... (dependency of apply-refact-0.4.1.0)
next goal: codex (dependency of dependencies-0.1.0.0)
rejecting: codex-0.5.1.2, codex-0.5.1.0 (conflict: ghc =>
process==1.6.1.0/installed-1.6..., codex => process>=1.2.3 && <1.5)
rejecting: codex-0.5.0.2, codex-0.5.0.0, codex-0.4.0.10, codex-0.4.0.8,
codex-0.4.0.6, codex-0.4.0.4, codex-0.4.0.2, codex-0.4.0.0, codex-0.3.0.10,
codex-0.3.0.8, codex-0.3.0.6, codex-0.3.0.4, codex-0.3.0.2, codex-0.3,
codex-0.2.1.10, codex-0.2.1.8, codex-0.2.1.6, codex-0.2.1.4, codex-0.2.1.2,
codex-0.2.1.0, codex-0.2.0.3, codex-0.2.0.2, codex-0.2.0.1, codex-0.2.0.0,
codex-0.1.0.5, codex-0.1.0.4, codex-0.1.0.3, codex-0.1.0.2, codex-0.1.0.1
(conflict: ghc => directory==1.3.0.2/installed-1.3..., codex =>
directory>=1.2.0.1 && <1.3)
rejecting: codex-0.1.0.0, codex-0.0.2.1, codex-0.0.2, codex-0.0.1.7,
codex-0.0.1.6, codex-0.0.1.5, codex-0.0.1.4, codex-0.0.1.3, codex-0.0.1.2
(conflict: base==4.10.1.0/installed-4.1..., codex => base>=4.6 && <4.8)
rejecting: codex-0.0.1.1, codex-0.0.1.0 (conflict:
base==4.10.1.0/installed-4.1..., codex => base>=4.7 && <4.8)
rejecting: codex-0.5.0.1 (conflict: ghc =>
directory==1.3.0.2/installed-1.3..., codex => directory>=1.2.0.1 && <1.3)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: codex (44), base (40), ghc (39),
apply-refact (11), dependencies (7)
<<<< Cabal errors end
Retrying with packages from lts-10.4 as preferences...
Attempt failed.
>>>> Cabal errors begin
CallStack (from HasCallStack):
die', called at ./Distribution/Client/Install.hs:240:21 in main:Distribution.Client.Install
cabal: Could not resolve dependencies:
trying: dependencies-0.1.0.0 (user goal)
trying: base-4.10.1.0/installed-4.1... (dependency of dependencies-0.1.0.0)
trying: directory-1.3.0.2/installed-1.3... (dependency of hscope-0.4.3)
trying: process-1.6.1.0/installed-1.6... (dependency of hscope-0.4.3)
next goal: codex (dependency of dependencies-0.1.0.0)
rejecting: codex-0.5.1.2, codex-0.5.1.0 (conflict:
process==1.6.1.0/installed-1.6..., codex => process>=1.2.3 && <1.5)
rejecting: codex-0.5.0.2, codex-0.5.0.0, codex-0.4.0.10, codex-0.4.0.8,
codex-0.4.0.6, codex-0.4.0.4, codex-0.4.0.2, codex-0.4.0.0, codex-0.3.0.10,
codex-0.3.0.8, codex-0.3.0.6, codex-0.3.0.4, codex-0.3.0.2, codex-0.3,
codex-0.2.1.10, codex-0.2.1.8, codex-0.2.1.6, codex-0.2.1.4, codex-0.2.1.2,
codex-0.2.1.0, codex-0.2.0.3, codex-0.2.0.2, codex-0.2.0.1, codex-0.2.0.0,
codex-0.1.0.5, codex-0.1.0.4, codex-0.1.0.3, codex-0.1.0.2, codex-0.1.0.1
(conflict: directory==1.3.0.2/installed-1.3..., codex => directory>=1.2.0.1 &&
<1.3)
rejecting: codex-0.1.0.0, codex-0.0.2.1, codex-0.0.2, codex-0.0.1.7,
codex-0.0.1.6, codex-0.0.1.5, codex-0.0.1.4, codex-0.0.1.3, codex-0.0.1.2
(conflict: base==4.10.1.0/installed-4.1..., codex => base>=4.6 && <4.8)
rejecting: codex-0.0.1.1, codex-0.0.1.0 (conflict:
base==4.10.1.0/installed-4.1..., codex => base>=4.7 && <4.8)
rejecting: codex-0.5.0.1 (conflict: directory==1.3.0.2/installed-1.3..., codex
=> directory>=1.2.0.1 && <1.3)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: codex (465), base (320), directory
(243), hscope (130), process (113), apply-refact (84), dependencies (80), ghc
(72)
<<<< Cabal errors end
*** Failed to arrive at a workable build plan.
Solver could not resolve package dependencies.
You can try the following:
- Use '--omit-packages to exclude conflicting package(s).
- Tweak the generated stack.yaml and then run 'stack solver':
- Add any missing remote packages.
- Add extra dependencies to guide solver.
- Update external packages with 'stack update' and try again.
"stack init --solver --resolver lts-10.4 --install-ghc" failed with error 1
*** setup_haskell.hs failed with error 1.
*** Aborting...
Hmm, what version of stack do you have? Can do a stack --version
.
If it winds up that you have the latest stack, we may be able to get past this by changing this line to:
stackInstall "lts-7.24" "cabal-install" True
This would ensure we are not doing the dependency solving with cabal 2, which apparently stack is having some trouble with.
I recommend first upgrading stack if needed and trying again before changing that line.
I have the latest version of Stack (1.6.3) on my machine. I'll try the other option and let you know how it goes.
Unfortunately, I'm getting the same error, except for the "Warning: Installed version of cabal-install (2.0.0.1) is newer than stack has been tested with. If you run into difficulties, consider downgrading." part.
@bidhan-a: So you are no longer seeing Warning: Installed version of cabal-install (2.0.0.1) is newer than stack has been tested with. If you run into difficulties, consider downgrading.
? I want to be sure that stack is using the correct cabal
binary.
Can you do a:
cabal --version
Based on #270 and #272, I'm wondering if there is some weirdness in your environment. Can you also do a:
cat ~/.stack/global-project/stack.yaml
Thank you for being so helpful on this! 👍
HI @jship ,
No problem at all.
That's correct. I'm no longer seeing that particular warning.
Here are the results:
cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
cat ~/.stack/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
# '/home/bidhan/.stack/config.yaml' instead.
#
# For more information about stack's configuration, see
# http://docs.haskellstack.org/en/stable/yaml_configuration/
#
packages: []
resolver: lts-10.4
Thanks.
Hmm, the plot thickens then! I feel like the next steps would be to try it on a clean VM. Are you doing any cleanup in between runs? If you want, you can try doing the install on a clean VM.
A "worst case" kind of workaround would be to explicitly install the helper binaries using a known compatible resolver until we can figure out something better. I think lts-7.24 was the last known one to work. In this case, we wouldn't even use stack
to do the dep solving. We'd just write out a stack.yaml with a hard-coded LTS or something. We'll have to think about it.
Hi @jship ,
Yes, I've done cleanups between runs. I also tested it on another Ubuntu system and I got the same result. I have tested it on a VM using both Ubuntu and Fedora distros, but to no avail.
Would you be able to point me in the right direction regarding how to get the workaround to work? I guess the "worst case" scenario will be good enough for people like me who just want to get this working, until there's a better solution.
Thanks
@bidhan-a, I merged your changes into my fork and was able to get the installer working with this additional (somewhat hacky) commit: https://github.com/jship/haskell-vim-now/commit/c05e841b9a3acc6eeb0fbd2d05411e19e7713db4
Will open a PR with more detail.
@jship , thanks a lot! The installer worked on my machine too. :sweat_smile:
One extra thing that I did; since we're using lts-7.24 for the time being anyway, I used it to install ghc-mod as well.
Thanks again.
That's great news, @bidhan-a! 👍 Thanks for re-testing.
I'll go ahead and merge that PR and close out this issue.
Closed by #288.
ghc-mod on 8.2.x has been broken for a while, but here recently looks like there is a workaround for getting it installed using
cabal-helper
. Some progress has been made too on adding official support.I could see this as pretty frustrating for new users of
haskell-vim-now
if theghc-mod
install blows up and the install fails. A few options:ghc-mod
. This could be a maintenance/support chore.ghc-mod
normally, but if it fails, don't stop the installer. Instead provide a link to instructions on troubleshooting the install of it.ghc-mod
as part ofhaskell-vim-now
's install. Instead just provide instructions.