haskell-hvr / missingh

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

We need directory >= 1.2.6.0 for usage of `isSymbolicLink' #34

Closed bergmark closed 8 years ago

bergmark commented 8 years ago

This makes the package easier to build on older GHCs

I published a revision (https://hackage.haskell.org/package/MissingH-1.4.0.0/revisions/) so a new release is not necessary.

jgoerzen commented 8 years ago

I'm confused about this one. My Debian stable system has directory-1.2.0.1 and MissingH builds fine. It is GHC 7.6, but MissingH predates directory-1.2.0.1 for quite some time. What exactly is the underlying issue?

bergmark commented 8 years ago

I've reverted the revisions.

Thanks for checking, it seems I didn't check carefully enough. I'm sorry about this.

The real problem was hard to figure out but here we go:

I noticed on http://matrix.hackage.haskell.org/package/MissingH that the GHC 7.4 build was failing with the error

src/System/IO/HVFS.hs:63:33:
    Module `System.Directory' does not export `isSymbolicLink'

I looked at the directory package (https://hackage.haskell.org/package/directory-1.2.6.3/docs/System-Directory.html) and saw that isSymbolicLink was introduced in 1.2.6.0.

I tried building on GHC 7.4 with directory >= 1.2.6 and saw that the build passed so i put that lower bound in place and after rebuilding on matrix.h.h.o everything was green.

The offending line is this:

import System.Directory hiding (isSymbolicLink)

On GHC >= 7.6 this is a warning that wasn't displayed because MissingH doesn't build with -Wall by default. On older GHC's this was an error and thus the build failed with the boot version (1.1.0.2) of directory since that version doesn't export isSymbolicLink.

A solution can't be made in a revision (at least not yet). Working solutions would be to use a qualified import, an explicit import list, or add a conditional in the .cabal file.

Edit: A fourth solution: Add a base >= 4.6 lower bound