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

Stack ide doesn't work with stack on lts-3.0 #49

Closed
rvion opened this issue Aug 15, 2015 · 5 comments
Closed

Stack ide doesn't work with stack on lts-3.0 #49

rvion opened this issue Aug 15, 2015 · 5 comments
Assignees

Comments

@rvion
Copy link

rvion commented Aug 15, 2015

Stack ide doesn't seem work with stack on lts-3.0

All details here lukexi/stack-ide-sublime#9 (I previously thought it was on sublime-stack-ide side)

Repro

  1. pulled master of stack, stack-ide, and stack-ide-sublime
  2. reinstalled stack and stack-ide, after setting: resolver: lts-3.0 in all stack.yaml files
  3. generated brand new test project: stack new supernova && cd supernova && stack build && stack ide start supernova

and got that

➜  supernova  stack ide start supernova
supernova-0.1.0.0: configure (test)
Configuring supernova-0.1.0.0...
supernova-0.1.0.0: build (test)
Preprocessing library supernova-0.1.0.0...
[1 of 1] Compiling Lib              ( src/Lib.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Lib.o )
In-place registering supernova-0.1.0.0...
Preprocessing test suite 'supernova-test' for supernova-0.1.0.0...
[1 of 1] Compiling Main             ( test/Spec.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/supernova-test/supernova-test-tmp/Main.o )
Linking .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/supernova-test/supernova-test ...
supernova-0.1.0.0: Test running disabled by --no-run-tests flag.
{"tag":"ResponseWelcome","contents":[0,1,1]}
{"tag":"ResponseLog","contents":"[Info] Initializing ide-backend session @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:195:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Session dir = /Users/RemiVion/dev/supernova/supernova/session.78526 @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:208:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Dist dir = /Users/RemiVion/dev/supernova/supernova/.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/ @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:210:3)\n"}
{"tag":"ResponseLog","contents":"[Debug] Local working dir = /Users/RemiVion/dev/supernova/supernova/ @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:217:17)\n"}
{"tag":"ResponseLog","contents":"[Info] Searching for ide-backend-server on this path: /Users/RemiVion/dev/supernova/supernova/.stack-work/install/x86_64-osx/lts-3.0/7.10.2/bin/:/Users/RemiVion/.stack/snapshots/x86_64-osx/lts-3.0/7.10.2/bin/:/Users/RemiVion/.local/bin:/Users/RemiVion/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.RPC.Client ./IdeSession/RPC/Client.hs:341:5)\n"}
{"tag":"ResponseLog","contents":"[Info] Found ide-backend-server - using this one: /Users/RemiVion/.local/bin/ide-backend-server @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.RPC.Client ./IdeSession/RPC/Client.hs:343:5)\n"}
{"tag":"ResponseLog","contents":"[Debug] Recompile required, starting... @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update.ExecuteSessionUpdate ./IdeSession/Update/ExecuteSessionUpdate.hs:223:5)\n"}
{"tag":"ResponseLog","contents":"[Info] Restarting session due to update requiring it. @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:422:11)\n"}
{"tag":"ResponseUpdateSession","contents":{"tag":"UpdateStatusRequiredRestart","contents":[]}}
{"tag":"ResponseLog","contents":"[Info] Restarting ide-backend-server @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update ./IdeSession/Update.hs:351:3)\n"}
{"tag":"ResponseLog","contents":"[Info] Searching for ide-backend-server on this path: /Users/RemiVion/dev/supernova/supernova/.stack-work/install/x86_64-osx/lts-3.0/7.10.2/bin/:/Users/RemiVion/.stack/snapshots/x86_64-osx/lts-3.0/7.10.2/bin/:/Users/RemiVion/.local/bin:/Users/RemiVion/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.RPC.Client ./IdeSession/RPC/Client.hs:341:5)\n"}
{"tag":"ResponseLog","contents":"[Info] Found ide-backend-server - using this one: /Users/RemiVion/.local/bin/ide-backend-server @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.RPC.Client ./IdeSession/RPC/Client.hs:343:5)\n"}
{"tag":"ResponseLog","contents":"[Debug] Recompile required, starting... @(ideba_HqZKAqZV4wa5sqhSD7XjZv:IdeSession.Update.ExecuteSessionUpdate ./IdeSession/Update/ExecuteSessionUpdate.hs:223:5)\n"}
{"tag":"ResponseUpdateSession","contents":{"tag":"UpdateStatusDone","contents":[]}}  

{"tag":"RequestGetSourceErrors","contents":[]}
{"tag":"ResponseGetSourceErrors","contents":[{"errorSpan":{"tag":"TextSpan","contents":"<from GhcException>"},"errorKind":"KindError","errorMsg":"ide-backend-server: cannot compile this file to desired target: /Users/RemiVion/dev/supernova/supernova/supernova.cabal\nUsage: For basic information, try the `--help' option."}]}

⚠️ as @lukexi pointed out:

errors sometimes don't appear til you nudge stack-ide with a query like {"tag":"RequestGetSourceErrors","contents":[]} which you can just paste on the command line

Indeed, to see the error, you have to paste {"tag":"RequestGetSourceErrors","contents":[]} into the shell

@bixuanzju
Copy link

Same problem here. I thought #48 fixed that, but appeared not the case in my machine.

@chrisdone
Copy link
Member

Fixed this in commercialhaskell/stack@6ac73da.

Although I have now discovered a more ominous problem of the cabal_macros.h file somehow appearing in the module files leading to the same kind of result.

@bixuanzju
Copy link

@chrisdone Thanks, it works now for me 👍

@chrisdone
Copy link
Member

Yay, fixed the other issue too in commercialhaskell/stack@1f0d455.

@rvion
Copy link
Author

rvion commented Aug 15, 2015

confirmed ! Perfect 👍

@rvion rvion closed this as completed Aug 15, 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

3 participants