atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haskell-ghc-mod: ghc-mod interactive command type failed with error Timeout #102

Closed newhoggy closed 8 years ago

newhoggy commented 8 years ago
  1. brew install haskell-stack
  2. cd
  3. stack build
  4. stack install ghc-mod
  5. add $HOME/.local/bin to path
  6. stack exec atom .
  7. Get type info for a function

Atom Version: 1.4.0 System: Mac OS X 10.11.3 Thrown From: haskell-ghc-mod package, v1.6.4

Stack Trace

Haskell-ghc-mod: ghc-mod interactive command type failed with error Timeout

At caps: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false}
URI: /Users/johnky/wrk/oarsome/src/Lib.hs
Args: 5,1
message: 
log:
-29.124s: ghc-modi said: x509-validation-1.6.3: build
-29.121s: ghc-modi said: x509-system-1.6.3: configure
-27.765s: ghc-modi said: x509-system-1.6.3: build
-26.154s: ghc-mod said: x509-validation-1.6.3: copy/register
-25.956s: ghc-modi said: x509-system-1.6.3: copy/register
-24.318s: ghc-modi said: x509-validation-1.6.3: copy/register
-24.085s: ghc-mod said: tls-1.3.4: download
-22.345s: ghc-modi said: tls-1.3.4: download
0s: Running ghc-modi command unmap-file,src/Lib.hs
0s: Timeout

Timeout
    at module.exports.Util.mkError (/Users/johnky/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15)
    at /Users/johnky/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:82:20

Commands

     -1:02.5.0 haskell-ghc-mod:show-type (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "/Users/johnky/.local/bin"
    ],
    "ghcModPath": "/Users/johnky/.local/bin/ghc-mod"
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.2
haskell-ghc-mod, v1.6.4
ide-haskell, v1.3.9
ide-haskell-cabal, v1.0.0
language-haskell, v1.5.2

# Dev
No dev packages
lierdakil commented 8 years ago

Try running 'stack setup && stack build' in your project directory. Log suggests that dependencies are missing, and stack tries to install those, hence the timeout. 24 янв. 2016 г. 7:57 пользователь "John Ky" notifications@github.com написал:

  1. brew install haskell-stack
  2. cd
  3. stack build
  4. stack install ghc-mod
  5. add $HOME/.local/bin to path
  6. stack exec atom .
  7. Get type info for a function

Atom Version: 1.4.0 System: Mac OS X 10.11.3 Thrown From: haskell-ghc-mod https://github.com/atom-haskell/haskell-ghc-mod package, v1.6.4 Stack Trace

Haskell-ghc-mod: ghc-mod interactive command type failed with error Timeout

At caps: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false} URI: /Users/johnky/wrk/oarsome/src/Lib.hs Args: 5,1 message: log: -29.124s: ghc-modi said: x509-validation-1.6.3: build -29.121s: ghc-modi said: x509-system-1.6.3: configure -27.765s: ghc-modi said: x509-system-1.6.3: build -26.154s: ghc-mod said: x509-validation-1.6.3: copy/register -25.956s: ghc-modi said: x509-system-1.6.3: copy/register -24.318s: ghc-modi said: x509-validation-1.6.3: copy/register -24.085s: ghc-mod said: tls-1.3.4: download -22.345s: ghc-modi said: tls-1.3.4: download 0s: Running ghc-modi command unmap-file,src/Lib.hs 0s: Timeout

Timeout at module.exports.Util.mkError (/Users/johnky/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15) at /Users/johnky/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:82:20

Commands

 -1:02.5.0 haskell-ghc-mod:show-type (atom-text-editor.editor.is-focused)

Config

{ "core": {}, "haskell-ghc-mod": { "additionalPathDirectories": [ "/Users/johnky/.local/bin" ], "ghcModPath": "/Users/johnky/.local/bin/ghc-mod" } }

Installed Packages

User

autocomplete-haskell, v0.6.2 haskell-ghc-mod, v1.6.4 ide-haskell, v1.3.9 ide-haskell-cabal, v1.0.0 language-haskell, v1.5.2

DevNo dev packages

— Reply to this email directly or view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/102.

newhoggy commented 8 years ago

You were partly right.

I'd already done the stack setup and stack build.

I noticed when I ran ghc-mod directly, it performed further build steps:

15:59 $ ghc-mod legacy-interactive
conduit-extra-1.1.9.2: configure
conduit-extra-1.1.9.2: build
vector-algorithms-0.7.0.1: configure
vector-algorithms-0.7.0.1: build
ini-0.3.4: configure
ini-0.3.4: build
aeson-0.10.0.0: configure
aeson-0.10.0.0: build
ini-0.3.4: copy/register
conduit-extra-1.1.9.2: copy/register
xml-conduit-1.3.3: download
xml-conduit-1.3.3: configure
xml-conduit-1.3.3: build
xml-conduit-1.3.3: copy/register
aeson-0.10.0.0: copy/register
amazonka-core-1.3.7: download
amazonka-core-1.3.7: configure
amazonka-core-1.3.7: build
amazonka-core-1.3.7: copy/register
amazonka-sqs-1.3.7: download
amazonka-ec2-1.3.7: download
amazonka-1.3.7: download
amazonka-dynamodb-1.3.7: download
amazonka-s3-1.3.7: download
amazonka-1.3.7: configure
amazonka-1.3.7: build
amazonka-sqs-1.3.7: configure
amazonka-sqs-1.3.7: build
amazonka-dynamodb-1.3.7: configure
amazonka-dynamodb-1.3.7: build
amazonka-s3-1.3.7: configure
amazonka-s3-1.3.7: build
amazonka-ec2-1.3.7: configure
amazonka-ec2-1.3.7: build
amazonka-1.3.7: copy/register
vector-algorithms-0.7.0.1: copy/register
mono-traversable-0.10.0.1: download
amazonka-sqs-1.3.7: copy/register
mono-traversable-0.10.0.1: configure
mono-traversable-0.10.0.1: build
amazonka-dynamodb-1.3.7: copy/register
mono-traversable-0.10.0.1: copy/register
chunked-data-0.2.0: download
chunked-data-0.2.0: configure
mutable-containers-0.3.2: download
chunked-data-0.2.0: build
mutable-containers-0.3.2: configure
mutable-containers-0.3.2: build
chunked-data-0.2.0: copy/register
mutable-containers-0.3.2: copy/register
classy-prelude-0.12.5: download
classy-prelude-0.12.5: configure
classy-prelude-0.12.5: build
classy-prelude-0.12.5: copy/register
amazonka-s3-1.3.7: copy/register
amazonka-ec2-1.3.7: copy/register
Completed 15 action(s).
oarsome-0.1.0.0: configure
Configuring oarsome-0.1.0.0...

After this, haskell-ide works. Thanks!

newhoggy commented 8 years ago

Nope. You are completely right. I must have run stack build in a different project.

Thanks for the quick response!