{"action":"created","issue":{"url":"https://api.github.com/repos/fpco/ide-backend/issues/279","labels_url":"https://api.github.com/repos/fpco/ide-backend/issues/279/labels{/name}","comments_url":"https://api.github.com/repos/fpco/ide-backend/issues/279/comments","events_url":"https://api.github.com/repos/fpco/ide-backend/issues/279/events","html_url":"https://github.com/fpco/ide-backend/issues/279","id":77940775,"number":279,"title":"Installing on Windows","user":{"login":"ncreep","id":784734,"avatar_url":"https://avatars.githubusercontent.com/u/784734?v=3","gravatar_id":"","url":"https://api.github.com/users/ncreep","html_url":"https://github.com/ncreep","followers_url":"https://api.github.com/users/ncreep/followers","following_url":"https://api.github.com/users/ncreep/following{/other_user}","gists_url":"https://api.github.com/users/ncreep/gists{/gist_id}","starred_url":"https://api.github.com/users/ncreep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncreep/subscriptions","organizations_url":"https://api.github.com/users/ncreep/orgs","repos_url":"https://api.github.com/users/ncreep/repos","events_url":"https://api.github.com/users/ncreep/events{/privacy}","received_events_url":"https://api.github.com/users/ncreep/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fpco/ide-backend/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":77,"created_at":"2015-05-19T05:28:00Z","updated_at":"2015-08-02T08:55:59Z","closed_at":null,"body":"Hi,\r\n\r\nI tried installing `ide-backend` on Windows, but the dependency on the `unix` package fails the whole process (even when using Cygwin).\r\n\r\nSo, are there any workarounds for getting `ide-backend` to work on Windows?\r\n\r\nThanks."},"comment":{"url":"https://api.github.com/repos/fpco/ide-backend/issues/comments/127000211","html_url":"https://github.com/fpco/ide-backend/issues/279#issuecomment-127000211","issue_url":"https://api.github.com/repos/fpco/ide-backend/issues/279","id":127000211,"user":{"login":"ncreep","id":784734,"avatar_url":"https://avatars.githubusercontent.com/u/784734?v=3","gravatar_id":"","url":"https://api.github.com/users/ncreep","html_url":"https://github.com/ncreep","followers_url":"https://api.github.com/users/ncreep/followers","following_url":"https://api.github.com/users/ncreep/following{/other_user}","gists_url":"https://api.github.com/users/ncreep/gists{/gist_id}","starred_url":"https://api.github.com/users/ncreep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncreep/subscriptions","organizations_url":"https://api.github.com/users/ncreep/orgs","repos_url":"https://api.github.com/users/ncreep/repos","events_url":"https://api.github.com/users/ncreep/events{/privacy}","received_events_url":"https://api.github.com/users/ncreep/received_events","type":"User","site_admin":false},"created_at":"2015-08-02T08:55:59Z","updated_at":"2015-08-02T08:55:59Z","body":"I've managed to track down the reason why the `mallocPlainForeignPtrByte` error suppresses the exception thrown by the server.\r\n\r\nThe exception itself is thrown in `Stream.hs` [here](https://github.com/fpco/ide-backend/blob/fb9297cdeddc7a573130cbb78b842481c068d0e2/ide-backend-common/IdeSession/RPC/Stream.hs#L42). Since this is not an `IOException` (unlike the the other errors in `Stream` [here](https://github.com/fpco/ide-backend/blob/fb9297cdeddc7a573130cbb78b842481c068d0e2/ide-backend-common/IdeSession/RPC/Stream.hs#L34)), the `mapIOToExternal` function that is responsible for fetching the server side errors ignores it and let's it bubble up back to the tests. \r\nCheating and somehow wrapping this exception into an `IOException` does trigger a proper `ExternalException` with the correct error message from the server.\r\n\r\nThe question now is, how come [`BSS.hGetSome`](https://github.com/fpco/ide-backend/blob/fb9297cdeddc7a573130cbb78b842481c068d0e2/ide-backend-common/IdeSession/RPC/Stream.hs#L39) throws this exception, instead of stumbling on an empty byte string (which is what I would expect when the server throws an exception)?\r\nAlso, how do the tests handle the case when the server crashes unexpectedly? Can the state of the remaining tests after the crash be corrupted by such an event?"}}