fpco / ide-backend

ide-backend drives the GHC API to build, query, and run your code
120 stars 17 forks source link

ide-backend-server needs of a server style sessionDir #285

Closed urbanslug closed 9 years ago

urbanslug commented 9 years ago

In an attempt to solve issue https://github.com/fpco/ide-backend/issues/280 I ran into the following problem:

The code is here: https://github.com/urbanslug/ide-backend/tree/non-server-env You can view it as a gist here: https://gist.github.com/urbanslug/06207423be741e899693

Current situation: In this code we don't create a session subdirectory unless we are in a server environment. We set the current working directory as the session directory so ffi/, dist/, rpc.* etc are created in the current working directory. We also don't create a "data/" or a "src/" subdirectory.
As IdeSession.Update.IdeSessionUpdate is set up right now it doesn't copy source files and ideSessionDir and ideSourceDir are set toid (this will be changed to be dependent on a the configLocalWorkingDirectory).

Problem: ide-backend-server complains that it can't execute hspec-discover (I assume it's having an issue with the PATH). ide-backend-server: could not execute: hspec-discover

What could I be doing wrong? Why is ide-backend-server in need of a server style sessionDir?

urbanslug commented 9 years ago

That code surprisingly passed the integration test.

snoyberg commented 9 years ago

As discussed separately: this was not in fact an ide-backend bug