commercialhaskell / stack-ide

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

"stack ide start [my project]" isn't loading my modules #48

Closed thomasjm closed 9 years ago

thomasjm commented 9 years ago

I've been trying to get started with stack-mode in Emacs, but it's become clear that there's something wrong with my ide-backend/stack-ide setup. I've installed the latest versions of master branch of stack-ide and stack from Github. My project is called "hite", when I type stack ide start hite I get the following kind of output:

...
<- {"tag":"ResponseLog","contents":"[Info] Found ide-backend-server - using this one: /Users/tomm/.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":"UpdateStatusProgress","contents":{"progressOrigMsg":"[1 of 1] Compiling Paths_hite       ( /Users/tomm/hite/.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/autogen/Paths_hite.hs, interpreted )","progressStep":1,"progressNumSteps":1,"progressParsedMsg":"Compiling Paths_hite"}}}
<- {"tag":"ResponseUpdateSession","contents":{"tag":"UpdateStatusDone","contents":[]}}
-> {"tag":"RequestGetSourceErrors","contents":[]}
<- {"tag":"ResponseGetSourceErrors","contents":[]}

It seems that ide-backend is not figuring out the structure of my project -- it's not loading or compiling any of the modules, and when it's asked for source errors it replies that there are none. My cabal file and project file are named the same as my project, as I saw in another thread. Can anyone help? Thanks!

drwebb commented 9 years ago

I've been having issues as well after upgrading a couple days ago, but haven't had the time to investigate myself. Currently back at my old emacs setup.

bixuanzju commented 9 years ago

Me too after I upgraded to stack version 0.1.3. I am afraid this is the issue on stack, since everything was fine to me using

$ stack --version
Version 0.1.2.7, Git revision 4fa8e0ca37f865e43514abfb81811e48da5eb3ec
chrisdone commented 9 years ago

Yes, I'm reproducing too. Not sure what the cause is, looking into it.

chrisdone commented 9 years ago

Same result on a fresh project: http://lpaste.net/raw/5667254560192724992

chrisdone commented 9 years ago

Fixed this in https://github.com/commercialhaskell/stack/commit/f7c0a45882bf07aa28a36f68e9e1d521094ab5f3. I caused a regression while fixing ghci in https://github.com/commercialhaskell/stack/issues/498.

bixuanzju commented 9 years ago

@chrisdone I am still getting the same result with your fix.

chrisdone commented 9 years ago

Did you reinstall stack?

thomasjm commented 9 years ago

The fix works for me, ide-backend is compiling stuff now -- thanks @chrisdone !