Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process C:\my-project not running #3443

Closed
codygman opened this issue Oct 18, 2015 · 10 comments
Closed

Process C:\my-project not running #3443

codygman opened this issue Oct 18, 2015 · 10 comments

Comments

@codygman
Copy link

Steps to reproduce using Windows 8.1 and (spacemacs-0.104.2):

  1. mkdir sample-project; cd sample-project; cabal init
  2. select executable when asked whether executable or library
  3. write main = undefined in a file named Main.hs
  4. SPC m s b
  5. Get error message C:\my project not running
@PierreR
Copy link
Contributor

PierreR commented Oct 18, 2015

I am not an windows (and I don't recognize the error message) but just in case could you first do SPC m s s (or ,ss) before loading the file with (,sb)

@codygman
Copy link
Author

Upon verifying my repro steps above I notice there is an error upon opening:

File mode specification error: (error "Process c:\\sample-project not running")

It opens up the shell window and I can confirm it works:

Hello, Haskell!
If I break, you can:
  1. Restart:           M-x haskell-process-restart
  2. Configure logging: C-h v haskell-process-log (useful for debugging)
  3. General config:    M-x customize-mode
  4. Hide these tips:   C-h v haskell-process-show-debug-tips
λ> 1 + 1
2
λ> 

Then I go back to the file and ,sb and it tells me Process C:\sample-project not running.

@codygman
Copy link
Author

For some odd reason it seems that debugging made the issue disappear. I tried again without debug-on-entry on and the bug still exists.

I've also verified that haskell-mode on vanilla emacs works just fine.

@codygman
Copy link
Author

Upon opening a Haskell file I get:

File mode specification error: (error "Process c:\\sample-project not running")

After setting debug-on-entry and reopening a Haskell file I get this backtrace:

Debugger entered--Lisp error: (error "Process c:\\sample-project not running")
  process-send-string(#<process c:\sample-project> "check c:/sample-project/Main.hs\n")
  ghc-with-process("check c:/sample-project/Main.hs\n" ghc-check-callback #[nil "\301\211�\207" [mode-line-process " -:-"] 2])
  ghc-check-syntax()
  ghc-init()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook haskell-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook haskell-mode-hook))
  run-mode-hooks(haskell-mode-hook)
  haskell-mode()
  set-auto-mode-0(haskell-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer Main.hs> "c:/sample-project/Main.hs" nil nil "c:/sample-project/Main.hs" (2533274790702288 3267088014))
  find-file-noselect("c:/sample-project/Main.hs" nil nil nil)
  find-file("c:/sample-project/Main.hs")
  find-file-existing("c:/sample-project/Main.hs")
  (lambda (&rest ignore) (find-file-existing "c:/sample-project/Main.hs"))((push-button :args nil :value "c:/sample-project/Main.hs" :action (lambda (&rest ignore) (find-file-existing "c:/sample-project/Main.hs")) :mouse-face highlight :follow-link "
" :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay #<overlay from 4027 to 4052 in *spacemacs*> :from #<marker (moves after insertion) at 4027 in *spacemacs*> :to #<marker at 4052 in *spacemacs*>) nil)
  widget-apply((push-button :args nil :value "c:/sample-project/Main.hs" :action (lambda (&rest ignore) (find-file-existing "c:/sample-project/Main.hs")) :mouse-face highlight :follow-link "
" :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay #<overlay from 4027 to 4052 in *spacemacs*> :from #<marker (moves after insertion) at 4027 in *spacemacs*> :to #<marker at 4052 in *spacemacs*>) :action nil)
  widget-apply-action((push-button :args nil :value "c:/sample-project/Main.hs" :action (lambda (&rest ignore) (find-file-existing "c:/sample-project/Main.hs")) :mouse-face highlight :follow-link "
" :button-prefix "" :button-suffix "" :format "%[%t%]" :button-overlay #<overlay from 4027 to 4052 in *spacemacs*> :from #<marker (moves after insertion) at 4027 in *spacemacs*> :to #<marker at 4052 in *spacemacs*>) nil)
  widget-button-press(4027)
  evil-ret-gen(nil nil)
  evil-ret(nil)
  funcall-interactively(evil-ret nil)
  call-interactively(evil-ret nil nil)
  command-execute(evil-ret)

@codygman
Copy link
Author

This backtrace confuses me since I tried vanilla emacs, adding melpa, then installing haskell-mode and things seem to work fine. So something with spacemacs is messing up the process-send-string call?

@codygman
Copy link
Author

New to trying to debug elisp, but it looks like the process is dying before the invocation of process-send-string?

@codygman
Copy link
Author

This error only happens when ghc-mod isn't properly installed. For some reason when it's properly installed everything works fine. Though I'd hope we want to make haskell-mode work without ghc-mod being properly installed.

@d12frosted
Copy link
Contributor

You can always set haskell-enable-ghc-mod to nil. But, you probably should report this problem in ghc-mod issue tracker.

@d12frosted
Copy link
Contributor

Oh, actually there were some problems with disabling ghc-mod-supoort, should be fixed by #3543.

@TheBB
Copy link
Contributor

TheBB commented Oct 26, 2015

Glad to see you fixed it. When #3543 is merged it should be possible to disable ghc-mod support without issues. Closing this on the recommendation of @d12frosted.

@TheBB TheBB closed this as completed Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants