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

Taking up all my resources #107

Closed ChristopherKing42 closed 8 years ago

ChristopherKing42 commented 8 years ago

[Enter steps to reproduce below:]

  1. Open Haskell File

Atom Version: 1.4.3 System: linux 4.4.1-2-ARCH Thrown From: haskell-ghc-mod package, v1.6.6

Stack Trace

Haskell-ghc-mod: ghc-mod interactive command info failed with error ghc-modi crashed

At caps: {"version":[5,5,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":false,"quoteArgs":true,"optparse":true}
URI: /home/theking/Haskell/tagsoup/Text/HTML/TagSoup/Render.hs
Args: --,renderTagsOptions
message: 
log:
-24.805s: Trying to run ghc-modi in /home/theking/Haskell/tagsoup
-24.804s: Checking for ghc-modi in /home/theking/Haskell/tagsoup
-24.804s: Spawning new ghc-modi instance for /home/theking/Haskell/tagsoup with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-24.804s: Spawning new ghc-modi instance for /home/theking/Haskell/tagsoup with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-24.767s: Started interactive action block in /home/theking/Haskell/tagsoup
-24.766s: Running ghc-modi command info,/home/theking/Haskell/tagsoup/Text/HTML/TagSoup/Render.hs,--,renderTagsOptions
-24.061s: ghc-modi said: cabal-helper-wrapper: Installing a private copy of Cabal because we couldn't
-24.06s: ghc-modi said: find the right version in your global/user package-db, this might take a
-24.059s: ghc-modi said: while but will only happen once per Cabal version you're using.
-24.059s: ghc-modi said: 
-24.058s: ghc-modi said: If anything goes horribly wrong just delete this directory and try again:
-24.058s: ghc-modi said:     /home/theking/.ghc-mod/cabal-helper
-24.057s: ghc-modi said: 
-24.057s: ghc-modi said: If you want to avoid this automatic installation altogether install
-24.056s: ghc-modi said: version 1.22.5.0 of Cabal manually (into your user or global package-db):
-24.056s: ghc-modi said:     $ cabal install Cabal --constraint "Cabal == 1.22.5.0"
-24.056s: ghc-modi said: 
-24.055s: ghc-modi said: Installing Cabal 1.22.5.0 ...
-23.916s: ghc-modi said: Warning: /home/theking/.cabal/config: Unrecognized field hyperlink-source on
-23.915s: ghc-modi said: line 91
-21.86s: ghc-modi said: Resolving dependencies...
-21.245s: ghc-modi said: Configuring Cabal-1.22.5.0...
-3.523s: ghc-mod said: Failed to install Cabal-1.22.5.0
-3.523s: ghc-mod said: Build log ( /home/theking/.cabal/logs/Cabal-1.22.5.0.log ):
-3.523s: ghc-mod said: cabal: Error: some packages failed to install:
-3.522s: ghc-mod said: Cabal-1.22.5.0 failed during the configure step. The exception was:
-3.522s: ghc-mod said: user error ('/home/theking/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc'
-3.522s: ghc-mod said: exited with an error:
-3.522s: ghc-mod said: )
-3.517s: ghc-mod said: cabal-helper-wrapper: Installing Cabal version 1.22.5.0 failed.
-3.517s: ghc-mod said: 
-3.517s: ghc-mod said: You have the following choices to fix this:
-3.517s: ghc-mod said: 
-3.516s: ghc-mod said: - The easiest way to try and fix this is just reconfigure the project and try
-3.516s: ghc-mod said:   again:
-3.516s: ghc-mod said:         $ cabal clean && cabal configure
-3.516s: ghc-mod said: 
-3.515s: ghc-mod said: - If that fails you can try to install the version of Cabal mentioned above
-3.515s: ghc-mod said:   into your global/user package-db somehow, you'll probably have to fix
-3.514s: ghc-mod said:   something otherwise it wouldn't have failed above:
-3.513s: ghc-mod said:         $ cabal install Cabal --constraint 'Cabal == 1.22.5.0'
-3.513s: ghc-mod said: 
-3.512s: ghc-mod said: - If you're using `Build-Type: Simple`:
-3.512s: ghc-mod said:   - You can see if you can reinstall your cabal-install executable while
-3.511s: ghc-mod said:     having it linked to a version of Cabal that's available in you
-3.511s: ghc-mod said:     package-dbs or can be built automatically:
-3.511s: ghc-mod said:         $ ghc-pkg list | grep Cabal  # find an available Cabal version
-3.51s: ghc-mod said:             Cabal-W.X.Y.Z
-3.509s: ghc-mod said:         $ cabal install cabal-install --constraint 'Cabal == W.X.*'
-3.509s: ghc-mod said:     Afterwards you'll have to reconfigure your project:
-3.509s: ghc-mod said:         $ cabal clean && cabal configure
-3.508s: ghc-mod said: 
-3.508s: ghc-mod said: - If you're using `Build-Type: Custom`:
-3.507s: ghc-mod said:   - Have cabal-install rebuild your Setup.hs executable with a version of the
-3.506s: ghc-mod said:     Cabal library that you have available in your global/user package-db:
-3.506s: ghc-mod said:         $ cabal clean && cabal configure
-3.5s: ghc-mod said:     You might also have to install some version of the Cabal to do this:
-3.5s: ghc-mod said:         $ cabal install Cabal
-3.499s: ghc-mod said: 
-3.493s: ghc-mod said: 
-2.781s: ghc-mod said: cabal-helper-wrapper: Installing a private copy of Cabal because we couldn't
-2.78s: ghc-mod said: find the right version in your global/user package-db, this might take a
-2.779s: ghc-mod said: while but will only happen once per Cabal version you're using.
-2.779s: ghc-mod said: 
-2.775s: ghc-mod said: If anything goes horribly wrong just delete this directory and try again:
-2.775s: ghc-mod said:     /home/theking/.ghc-mod/cabal-helper
-2.775s: ghc-mod said: 
-2.775s: ghc-mod said: If you want to avoid this automatic installation altogether install
-2.774s: ghc-mod said: version 1.22.5.0 of Cabal manually (into your user or global package-db):
-2.774s: ghc-mod said:     $ cabal install Cabal --constraint "Cabal == 1.22.5.0"
-2.774s: ghc-mod said: 
-2.773s: ghc-mod said: Installing Cabal 1.22.5.0 ...
-2.594s: ghc-mod said: Warning: /home/theking/.cabal/config: Unrecognized field hyperlink-source on
-2.589s: ghc-mod said: line 91
-0.112s: ghc-mod said: Resolving dependencies...
-0.082s: ghc-modi said: Failed to install Cabal-1.22.5.0
-0.082s: ghc-modi said: Build log ( /home/theking/.cabal/logs/Cabal-1.22.5.0.log ):
-0.081s: ghc-modi said: cabal: Error: some packages failed to install:
-0.08s: ghc-modi said: Cabal-1.22.5.0 failed during the configure step. The exception was:
-0.08s: ghc-modi said: user error ('/home/theking/.stack/programs/x86_64-linux/ghc-7.10.2/bin/ghc'
-0.062s: ghc-modi said: exited with an error:
-0.062s: ghc-modi said: )
-0.052s: ghc-modi said: cabal-helper-wrapper: Installing Cabal version 1.22.5.0 failed.
-0.052s: ghc-modi said: 
-0.052s: ghc-modi said: You have the following choices to fix this:
-0.052s: ghc-modi said: 
-0.05s: ghc-modi said: - The easiest way to try and fix this is just reconfigure the project and try
-0.05s: ghc-modi said:   again:
-0.05s: ghc-modi said:         $ cabal clean && cabal configure
-0.05s: ghc-modi said: 
-0.05s: ghc-modi said: - If that fails you can try to install the version of Cabal mentioned above
-0.05s: ghc-modi said:   into your global/user package-db somehow, you'll probably have to fix
-0.048s: ghc-modi said:   something otherwise it wouldn't have failed above:
-0.048s: ghc-modi said:         $ cabal install Cabal --constraint 'Cabal == 1.22.5.0'
-0.048s: ghc-modi said: 
-0.047s: ghc-modi said: - If you're using `Build-Type: Simple`:
-0.047s: ghc-modi said:   - You can see if you can reinstall your cabal-install executable while
-0.046s: ghc-modi said:     having it linked to a version of Cabal that's available in you
-0.046s: ghc-modi said:     package-dbs or can be built automatically:
-0.046s: ghc-modi said:         $ ghc-pkg list | grep Cabal  # find an available Cabal version
-0.046s: ghc-modi said:             Cabal-W.X.Y.Z
-0.044s: ghc-modi said:         $ cabal install cabal-install --constraint 'Cabal == W.X.*'
-0.044s: ghc-modi said:     Afterwards you'll have to reconfigure your project:
-0.044s: ghc-modi said:         $ cabal clean && cabal configure
-0.044s: ghc-modi said: 
-0.044s: ghc-modi said: - If you're using `Build-Type: Custom`:
-0.041s: ghc-modi said:   - Have cabal-install rebuild your Setup.hs executable with a version of the
-0.032s: ghc-modi said:     Cabal library that you have available in your global/user package-db:
-0.032s: ghc-modi said:         $ cabal clean && cabal configure
-0.014s: ghc-modi said:     You might also have to install some version of the Cabal to do this:
-0.014s: ghc-modi said:         $ cabal install Cabal
-0.014s: ghc-modi said: 
-0.014s: ghc-modi said: 
-0.014s: ghc-modi said: ghc-mod: readCreateProcess: /usr/lib/cabal-helper-wrapper "--with-ghc=ghc" "--with-ghc-pkg=ghc-pkg" "--with-cabal=cabal" "/home/theking/Haskell/tagsoup" "/home/theking/Haskell/tagsoup/dist" "package-db-stack" "entrypoints" "source-dirs" "ghc-options" "ghc-src-options" "ghc-pkg-options" "ghc-merged-pkg-options" "ghc-lang-options" "licenses" "flags" "config-flags" "non-default-config-flags" "compiler-version" (exit 1): failed
-0.002s: ghc-modi for /home/theking/Haskell/tagsoup ended with 1
-0.002s: ghc-modi for /home/theking/Haskell/tagsoup ended with 1
-0.001s: Running ghc-modi command unmap-file,/home/theking/Haskell/tagsoup/Text/HTML/TagSoup/Render.hs
0s: ghc-modi crashed

ghc-modi crashed
    at module.exports.Util.mkError (/home/theking/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15)
    at ChildProcess.exitCallback (/home/theking/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:76:20)
    at emitTwo (events.js:92:20)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

  3x -2:56.1.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:52.7.0 ide-haskell-repl:exec-command (atom-text-editor.editor.ide-haskell-repl.is-focused)
  2x -2:45.7.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:36.2.0 editor:newline (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:35.7.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:35.4.0 ide-haskell-repl:exec-command (atom-text-editor.editor.ide-haskell-repl.is-focused)
  3x -2:32.7.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:30.5.0 editor:newline (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:30.1.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:29.9.0 ide-haskell-repl:exec-command (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:09.3.0 editor:newline (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:08.7.0 core:backspace (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:08.4.0 ide-haskell-repl:exec-command (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -2:04.0 ide-haskell-repl:toggle (atom-text-editor.editor.is-focused)
     -0:33.9.0 ide-haskell-repl:exec-command (atom-text-editor.editor.ide-haskell-repl.is-focused)
     -0:29.5.0 ide-haskell-repl:toggle (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.2
haskell-ghc-mod, v1.6.6
ide-haskell, v1.3.9
ide-haskell-repl, v0.0.17
language-haskell, v1.5.2
markdown-format, v2.5.1
terminal-plus, v0.14.5

# Dev
No dev packages

Even after I close atom, there are a dozen haskell processes running (really long ones, that mention cabal helper.

lierdakil commented 8 years ago

Install Cabal 1.22.5.0. Also might want to install cabal-install. Note that your user package db is probably broken. Run ghc-pkg check to see why exactly.

ChristopherKing42 commented 8 years ago

Fixed when I fixed #108.