commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

stack-mode won't work #56

Open ghost opened 9 years ago

ghost commented 9 years ago

Two issues, possibly related.

First, there is a message:

File mode specification error: (void-function haskell-cabal-find-file)

This can be fixed (I guess), by adding

(require 'haskell-cabal)

to stack-mode.el, but then I got:

Stack backend isn't ready. Waiting (0 attempts) ...
Starting a Stack IDE backend process for this project: geval, stack directory: /home/filipg/ext/geval/
Set initial command.
Wrote /home/filipg/ext/geval/src/GEval.hs
error in process filter: cond: Command handler error: (wrong-type-argument stringp nil)

The command queue has been cleared.
error in process filter: Command handler error: (wrong-type-argument stringp nil)

(GEval is my piece of code.) The last line in *stack:geval* is:

<- {"tag":"ResponseGetSourceErrors","contents":[{"errorSpan":{"tag":"TextSpan","contents":"<no location info>"},"errorKind":"KindError","errorMsg":"can't find file: /home/filipg/ext/geval/GEval"}]}

Emacs: 24.5.1, haskell-mode: 13.14.2, flycheck: 0.24, stack-ide: d096461bb4d2e800f67a934000a31125e95bf0be

jcpetruzza commented 9 years ago

Regarding the second error, this seems to be a problem in stack-ide that is affecting also users of the Sublime plugin, see https://github.com/lukexi/stack-ide-sublime/issues/12 and https://github.com/lukexi/stack-ide-sublime/issues/13

The problem seems to be that a module name (in the case of the OP's error GEval) is being used where the name a filename is expected.

tomv564 commented 8 years ago

The second issue went away for me when I upgraded stack and stack ide to recent versions.