haskell / process

Library for dealing with system processes
http://hackage.haskell.org/package/process
Other
87 stars 82 forks source link

Fix javascript build #327

Closed bgamari closed 2 months ago

bgamari commented 2 months ago

Currently master is not buildable with the Javascript backend due to

libraries/process/System/Process/CommunicationHandle/Internal.hsc:26:8: error: [GHC-87110]
    Could not load module ‘System.Posix’.
    It is a member of the hidden package ‘unix-2.8.4.0’.
    Use -v to see a list of the files searched for.
   |
26 | import Control.Exception (catch, throwIO)
   |        ^^^^^^^^^^^^
bgamari commented 2 months ago

In particular, the problematic imports are

import System.Posix
  ( Fd(..)
  , FdOption(..), setFdOption
  )
import System.Posix.Internals
  ( fdGetMode )
bgamari commented 2 months ago

It looks like setFdOption is available with the Javascript backend. Consequently I believe simply adding a unix dependency should resolve this.