On 6 July 2016 at 18:14, Ben Gamari <ben@smart-cactus.org> wrote:

Alberto Valverde <alberto@toscat.net> writes:

> I've hacked around this to test the feasibility of the approach by using
> stdin/stdout instead of creating new pipes and, surprisingly, managed to
> cross-compile a simple Template Haskell program.
>
Well done!

Indeed, nice hacking :)
 
> I'm considering using a socket for communicating between both processes as
> a more permanent solution but this would incur in a dependency on the
> "network" package. Would this be acceptable?
>
It would be nice if we could avoid it; GHC depending upon a library has
the very unfortunate effect that any user code also needing to link
against GHC or one of its libraries now has no choice in the version of
that library. We go to some lengths to try to keep the dependency
footprint of GHC small for this reason.

> Named pipes have also crossed my mind but I'm not sure how well they're
> supported by wine.
>
It would be great if there were some way we could make this work with
named pipes. Not only does it side-step the dependency issue, but it
feels like the right way forward.

I agree, named pipes are probably a better plan, perhaps a better solution overall than the way we currently pass FD numbers on the command line.  Do named pipes work work as expected through wine?  We would have to be careful to clean them up again afterwards.

Cheers,
Simon