Wednesday, September 12, 2007

Cohatoe development progress

Here's a brief status update about the latest few patches that just went into the Darcs repo.

I have fixed a bug that caused Cohatoe to select the wrong platform-specific fragment, and thus the wrong server executable, if there was more than one present. In other words, if you had Cohatoe running with both the Linux and the Windows fragment installed, it crashed under Windows because it tried to run the Linux executable - even though the Linux fragment wasn't activated. Cohatoe can now figure out which fragment is the correct one. (I suspect that has troubled nobody but me so far, but it was nagging me a bit. I wanted to catch up with the Linux version, but I had the fragment project disabled because of this bug. I think I will be able to get a well-working Linux version along with the Windows one for the next preview release. I've already re-activated my old Gentoo box for this :-)

I have also built in an automatism to pass on GHC runtime options to the Cohatoe runtime. If you have some Haskell code contributed via Cohatoe which needs to enable RTS options, you can now specify them on the command line for the Eclipse executable (or better, in the eclipse.ini file), and they are detected by Cohatoe and passed on to the Haskell server. You can specify the +RTS ... -RTS as you would pass them to any GHC-compiled executable. (In the eclipse.ini, take care that you have exactly one option per line, because that's how Eclipse expects them.)

At the moment, options that are not accepted by the GHC RTS break the Cohatoe server (i.e. the server executable doesn't even start at all). So if you are playing around with the options, you better have Cohatoe's tracing enabled to see what actually happens. Without that, all you see is an IllegalStateException that complains about a dead server. I will build in some more sophisticated recovery with more info within one of the next iterations.

Have fun :-)

No comments: