-
Notifications
You must be signed in to change notification settings - Fork 12
Prototype for evaluation on the server. #30
Conversation
Spawns `ghci` or `cabal repl` and clears the initial output, nothing more yet. I'm not sure whether I like doing this in Haskell, because it looks quite verbose.
Doesn't return error output yet.
|
I've integrated it into the server code and put two minimal tests in To make this possible we now pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to handle closing the repl session gracefully here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like you already wrote endSession. Does that do the job here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should. I'll add it.
|
This looks great. I think handling the repl sessions in the server code is definitely worth it. I added some comments, but mostly just questions for my understanding. I'm happy to merge this if you are. |
|
Please look at the outdated diffs. I made a commit that caused github to think they were addressed. |
|
I changed the ClojureScript part to use the server now. It works for me now as it did before. Could you test this yourself, too? I had to change the |
|
I'm getting an error whenever the process tries to boot: It looks like it's happening in |
|
On which file did you try it? |
|
LTHaskellClient |
|
It happens on ReplSession too. |
|
Mhh.. it still works for me. What do you evaluate? |
|
1 + 1. It's on booting the process though, so any command I try to do fails. I can try and figure it out later. What platform are you on? Maybe it's an OS difference? |
|
I'm on Linux. The only thing i could think of is line endings, but I don't think that is it. Did the ClojureScript version work for you? |
|
One idea/thing you could try: Could it be that starting |
And start the repl in that directory.
|
Right "3\n" It seems fine. I'll dig around more |
|
It's weird because the test_server works fine. Just when it's in process it fails. |
|
And yes, the cljs version worked. |
|
If I boot the connection manually (using the add connection sidebar) from the directory that has the cabal project, it works. I think the problem is it doesn't find the cabal file and boot a repl and boots ghci instead. That last commit you made should have fixed that issue though. |
|
Okay, I figured it out. It was a nasty issue with my load path. It seems LightTable's process PATH's are a bit rough still. It all looks good! |
Prototype for evaluation on the server.
|
That's good. :) If it's something that might occur more frequently probably create a troubleshooting section in the README for issues such as this? Or maybe print out a better debugging/error message? |
|
Yeah, I'll add something there. Every problem I've had has come from On Mon, Jan 27, 2014, at 12:11 AM, Lucas Stadler wrote: That's good. :) If it's something that might occur more frequently — Reply to this email directly or [1]view it on GitHub. References |
|
I think some tests would help to be sure that we didn't break anything on the Haskell side. We could also check if Regarding stack traces, I've never used this, but maybe this would help? http://www.haskell.org/haskellwiki/Debugging#Stack_trace Not in the case of the loading path though, because we already knew where it failed. |
|
Agreed. I think we should really start testing both. I don't know how to test the LT stuff though. That's another reason for wanting to do most of the heavy lifting in haskell. |
Not integrated in the server yet, but you can use it on it's own:
Comments, suggestions?