haskell-hvr / missingh

Utility library [Haskell]
https://hackage.haskell.org/package/MissingH
Other
87 stars 40 forks source link

Build failure with unix-2.8 #62

Closed andreasabel closed 1 year ago

andreasabel commented 1 year ago

Currently relaxing to unix-2.8 is not possible:

[22 of 45] Compiling System.Daemon    ( src/System/Daemon.hs, /Users/abel/project/open-source/hvr/missingh/dist-newstyle/build/x86_64-osx/ghc-9.4.3/MissingH-1.5.0.1/build/System/Daemon.o, /Users/abel/project/open-source/hvr/missingh/dist-newstyle/build/x86_64-osx/ghc-9.4.3/MissingH-1.5.0.1/build/System/Daemon.dyn_o ) [System.Directory package changed]

src/System/Daemon.hs:89:18: error:
    • Couldn't match expected type: unix-2.8.0.0:System.Posix.IO.Common.OpenFileFlags
                                    -> IO System.Posix.Types.Fd
                  with actual type: IO System.Posix.Types.Fd
    • The function ‘openFd’ is applied to four value arguments,
        but its type ‘FilePath
                      -> OpenMode
                      -> unix-2.8.0.0:System.Posix.IO.Common.OpenFileFlags
                      -> IO System.Posix.Types.Fd’
        has only three
      In a stmt of a 'do' block:
        nullFd <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags
      In the second argument of ‘($)’, namely
        ‘do setCurrentDirectory "/"
            mapM_ closeFd [stdInput, stdOutput, ....]
            nullFd <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags
            mapM_ (dupTo nullFd) [stdInput, stdOutput, ....]
            ....’
   |
89 |        nullFd <- openFd "/dev/null" ReadWrite Nothing defaultFileFlags
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
andreasabel commented 1 year ago

Relaxing to unix-2.8 will make directory-1.3.8 available which is no longer Safe, so the safe imports of System.Directory need to be made vanilla imports, and {-# LANGUAGE Safe #-} might have to be dropped from some MissingH modules.

ysangkok commented 1 year ago

Just curious, who is still using this? I managed to migrate off of it, and the library seems to be a weird combination of all sorts of things. Not saying it shouldn't be maintained...

andreasabel commented 1 year ago

Dunno, here is a reverse dependency list: https://packdeps.haskellers.com/reverse/MissingH The problem with such a list is of course that it does not say much about your users: whether they are still buildable, used themselves etc. I am happy to pass on maintainership, I am just a steward of this package...