Closed jchia closed 6 years ago
Please bump path-io
version in Cabal file and add
extra-deps:
- path-io-1.2.2
To stack.yaml
in this PR as well.
Next Travis build should start to pass after these changes, path-io-1.2.2
is already on Hackage.
It turns out that Path.IO.setModificationTime
requires MIN_VERSION_directory(1,2,3)
, so saveEntry
won't compile with an older directory
package.
One option is to make path-io-1.2.3
require directory
>= 1.2.3 and make zip require path-io
>= 1.2.3.
Indeed, but this way we also will lose compatibility with older GHCs, because directory
versions correspond to GHC versions.
So unfortunatelly it looks like I can't really merge this till 7.8 and 7.10 became so old that we don't need to support them.
If you need this for your personal usage, I think you know now how to make it work in your projects.
It's unfortunate that directory package for ghc 7.10 doesn't support setting modification time. Silently not restoring the modification time when setModificationTime is unavailable is not a good solution, either.
I took a quick glance at the code for System.Directory.setModificationTime
and it looks quite a multi-platform ball of noodles, though I haven't investigated why that code wouldn't work under ghc 7.10.
There are a number of packages, directory
included, that are frozen for every GHC release. So when you compile with certain GHC version, you're bound to use particular directory
version that corresponds to it. Since we know that older directory
(before 1.2.3.0) doesn't support setModificationTime
, we can't support older GHC because of this.
25
Test passes on my machine with latest path-io.