erikd / conduit-find

Other
12 stars 5 forks source link

Cannot build on Windows #2

Open mantkiew opened 10 years ago

mantkiew commented 10 years ago

I am hoping to implement a find functionality which ignores globs specified in a .gitignore-like file. Unfortunately, on Windows I am getting an error since find-conduit depends on unix-2.7.0.1, which I cannot build.

cabal.exe: Package unix-2.7.0.1 can't be built on this system.
Failed to install unix-2.7.0.1
cabal.exe: Error: some packages failed to install:
find-conduit-0.4.1 depends on unix-2.7.0.1 which failed to install.
unix-2.7.0.1 failed during the building phase. The exception was:
ExitFailure 1

Is there a way to make the package cross-platform the same way as fsnotify?

EDIT: I see that only the executable depends on the unix package. I changed that to unix-compat but unfortunately, I am still getting the following (I'm on GHC 7.6.3 and HaskellPlatform 2013.2.0.0):

cabal.exe: Error: some packages failed to install:
chunked-data-0.1.0.1 depends on vector-instances-0.0.2.1 which failed to
install.
conduit-combinators-0.2.5.2 depends on vector-instances-0.0.2.1 which failed
to install.
find-conduit-0.4.1 depends on vector-instances-0.0.2.1 which failed to
install.
mono-traversable-0.6.0 depends on vector-instances-0.0.2.1 which failed to
install.
vector-instances-0.0.2.1 failed during the building phase. The exception was:
ExitFailure 1
jwiegley commented 10 years ago

Yes, it is my intention to make this package fully capable on Windows. At the moment it is using several optimizations which require Unix, but this will be made optional shortly.

mantkiew commented 10 years ago

After I changed unix to unix-compat, the problem seems to be only with vector-instances:

Configuring vector-instances-0.0.2.1...
Building vector-instances-0.0.2.1...
Preprocessing library vector-instances-0.0.2.1...
[1 of 1] Compiling Data.Vector.Instances ( Data\Vector\Instances.hs, dist\dist-sandbox-2b5adf9f\build\Data\Vector\Instan
ces.o )

Data\Vector\Instances.hs:26:10:
    Duplicate instance declarations:
      instance Functor Vector
        -- Defined at Data\Vector\Instances.hs:26:10
      instance Functor Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:30:10:
    Duplicate instance declarations:
      instance Monad Vector -- Defined at Data\Vector\Instances.hs:30:10
      instance Monad Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:38:10:
    Duplicate instance declarations:
      instance MonadPlus Vector
        -- Defined at Data\Vector\Instances.hs:38:10
      instance MonadPlus Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:44:10:
    Duplicate instance declarations:
      instance Applicative Vector
        -- Defined at Data\Vector\Instances.hs:44:10
      instance Applicative Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:55:10:
    Duplicate instance declarations:
      instance Alternative Vector
        -- Defined at Data\Vector\Instances.hs:55:10
      instance Alternative Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:61:10:
    Duplicate instance declarations:
      instance Foldable Vector
        -- Defined at Data\Vector\Instances.hs:61:10
      instance Foldable Vector -- Defined in `Data.Vector'

Data\Vector\Instances.hs:71:10:
    Duplicate instance declarations:
      instance Traversable Vector
        -- Defined at Data\Vector\Instances.hs:71:10
      instance Traversable Vector -- Defined in `Data.Vector'
Failed to install vector-instances-0.0.2.1

Is that platform-specific?

mantkiew commented 10 years ago

Actually, here's the real source of the problem. I have HaskellPlatform 2013.2.0.0. After getting the sources (master) and changing unix to unix-compat, with a fresh sandbox, I get this first:


/d/projects/find-conduit 
$ cabal install
Resolving dependencies...
In order, the following would be installed:
base16-bytestring-0.1.1.6 (new package)
base64-bytestring-1.0.0.1 (new package)
blaze-builder-0.3.3.2 (new package)
dlist-0.7.0.1 (new package)
mwc-random-0.13.1.1 (new package)
nats-0.2 (new package)
semigroups-0.14 (new package)
dlist-instances-0.1 (new package)
system-filepath-0.4.11 (new package)
system-fileio-0.3.13 (new package)
tagged-0.7.2 (new package)
transformers-0.4.1.0 (new version)
mmorph-1.0.3 (new package)
mtl-2.2.0.1 (new version)
MonadRandom-0.1.13 (new package)
exceptions-0.6.1 (new package)
parsec-3.1.5 (new version)
network-2.5.0.0 (new version)
regex-base-0.93.2 (reinstall) changes: mtl-2.1.2 -> 2.2.0.1
regex-posix-0.95.2 (reinstall)
streaming-commons-0.1.2.4 (new package)
transformers-base-0.4.2 (new package)
monad-control-0.3.3.0 (new package)
lifted-base-0.2.2.2 (new package)
resourcet-1.1.2.2 (new package)
transformers-compat-0.3.2 (new package)
contravariant-0.6 (new package)
distributive-0.4.4 (new package)
comonad-4.2 (new package)
semigroupoids-4.0.2 (new package)
either-4.1.2 (new package)
unix-compat-0.4.1.1 (new package)
vector-algorithms-0.6.0.1 (new package)
vector-instances-0.0.2.1 (latest: 3.3) (new package)
mono-traversable-0.6.0 (new package)
chunked-data-0.1.0.1 (new package)
void-0.6.1 (new package)
conduit-1.1.2.1 (new package)
conduit-extra-1.1.0.3 (new package)
conduit-combinators-0.2.5.2 (new package)
find-conduit-0.4.1 (new package)
cabal.exe: The following packages are likely to be broken by the reinstalls:
regex-compat-0.95.1
haskell-platform-2013.2.0.0
Use --force-reinstalls if you want to install anyway.

Only then, after I try using --force-reinstalls, I am getting the problem with vector-instances from the previous comment. Is it possible to relax the dependencies so that it is compatible with the HaskellPlatform 2013.2.0.0?

jwiegley commented 10 years ago

Yes, I will change the dependencies to target the current HP.