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

`cannot satisfy -package-id` in Atom, but not in ghc-mod #146

Closed cblp closed 8 years ago

cblp commented 8 years ago

Steps to reproduce:

  1. See 3 files below.
  2. Open Spec.hs and run "Haskell Ghc Mod: Check File"

Atom Version: 1.6.2 System: Ubuntu 16.04 Thrown From: haskell-ghc-mod package, v1.13.2

Atom is run as stack exec atom.

stack build, stack test and ghc-mod check work ok:

$ stack exec ghc-mod check Spec.hs 
example-0.1.0.0: configure
Configuring example-0.1.0.0...

Stack Trace

Haskell-ghc-mod: ghc-mod command check failed with error code 1

At caps: {"version":[5,5,0,0],"fileMap":true,"quoteArgs":true,"optparse":true,"typeConstraints":false,"browseParents":false,"interactiveCaseSplit":false}
URI: /home/cblp/dev/example/Spec.hs
Args: --
message: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 

    tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:

      ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f

    (use -v for more information)

log:
-16.712s: Main did-save triggered
-16.712s: Main updating
-16.699s: running ghc-mod check,/home/cblp/dev/example/Spec.hs,-- with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-16.691s: running ghc-mod lint,/home/cblp/dev/example/Spec.hs,-- with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-16.684s: running ghc-mod browse,-d,--,Main with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-16.402s: ghc-mod said: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 
-16.401s: ghc-mod said:     tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:
-16.401s: ghc-mod said:       ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f
-16.4s: ghc-mod said:     (use -v for more information)
-16.398s: ghc-mod ended with code 1
-16.398s: code 1: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 

    tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:

      ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f

    (use -v for more information)

-16.37s: ghc-mod ended with code 0
-16.349s: ghc-mod said: EXCEPTION: browse:
-16.348s: ghc-mod said:            <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 
-16.348s: ghc-mod said:                tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:
-16.347s: ghc-mod said:                  ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f
-16.347s: ghc-mod said:                (use -v for more information)
-16.344s: ghc-mod ended with code 0
-16.344s: Main updated
-0.297s: Main did-save triggered
-0.297s: Main updating
-0.287s: running ghc-mod check,/home/cblp/dev/example/Spec.hs,-- with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-0.277s: running ghc-mod lint,/home/cblp/dev/example/Spec.hs,-- with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-0.269s: running ghc-mod browse,-d,--,Main with options.cwd = /home/cblp/dev/example,options.env = [object Object],options.encoding = utf-8
-0.003s: ghc-mod said: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 
-0.002s: ghc-mod said:     tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:
-0.002s: ghc-mod said:       ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f
-0.002s: ghc-mod said:     (use -v for more information)
0s: ghc-mod ended with code 1
0s: code 1: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 

    tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:

      ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f

    (use -v for more information)

code 1: ghc-mod: <command line>: cannot satisfy -package-id tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60: 

    tasty-0.11.0.3-376d54c6eddcbb9835d715cda84bbf60 is unusable due to missing or recursive dependencies:

      ansi-terminal-0.6.2.3-7b40b18f4e53e6f53c2ffd807e929ca9 async-2.1.0-033e4fae4da028fc2d6502bd36e5e5a1 mtl-2.2.1-3af90341e75ee52dfc4e3143b4e5d219 optparse-applicative-0.12.1.0-e571c94d6c730b4cb5b36eba77024bb6 regex-tdfa-1.2.1-f494bfd486b4ee3d50aa34575ec307a4 stm-2.4.4.1-7050c728ed5b2315e2c6b56d8bf9837f

    (use -v for more information)

    at module.exports.Util.mkError (/home/cblp/felix/home/.atom/packages/haskell-ghc-mod/lib/util.coffee:215:15)
    at BufferedProcess.exit (/home/cblp/felix/home/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process-real.coffee:101:20)
    at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /usr/share/atom/resources/app.asar/src/buffered-process.js:227:18
    at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

     -1:17.4.0 core:copy (atom-text-editor.editor.is-focused)
     -0:59.5.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:59.2.0 core:copy (atom-text-editor.editor.is-focused)
     -0:38.1.0 pane:show-previous-item (atom-text-editor.editor.is-focused)
     -0:37.8.0 core:save (atom-text-editor.editor.is-focused)
     -0:37.8.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -0:35.9.0 ide-haskell:close-tooltip (atom-text-editor.editor.is-focused)
     -0:35.9.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:35.9.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:17.1.0 core:save (atom-text-editor.editor.is-focused)
     -0:17.1.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)
     -0:16 ide-haskell:close-tooltip (atom-text-editor.editor.is-focused)
     -0:16 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:16 core:cancel (atom-text-editor.editor.is-focused)
     -0:00.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:00.7.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused)

Installed Packages

# User
autocomplete-haskell, v0.6.5
haskell-ghc-mod, v1.13.2
highlight-selected, v0.11.2
ide-haskell, v1.6.3
ide-haskell-stack, v0.0.3
language-cpp14, v0.6.1
language-haskell, v1.7.15
language-markdown, v0.13.0
linter, v1.11.4
linter-pylint, v1.2.0

stack.yaml

resolver: lts-5.17

example.cabal

name:                example
version:             0.1.0.0
build-type:          Simple
cabal-version:       >= 1.10

library
    build-depends:    base >= 4.7 && < 5
    default-language: Haskell2010

test-suite example-test
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    build-depends:    base
                    , tasty
    default-language: Haskell2010

Spec.hs

main = return ()
lierdakil commented 8 years ago

Try updating to hgm-1.14. Also, please update Atom while you're at it.

cblp commented 8 years ago

Seems fixed. Thank you!