I have a project, it's inside a sandbox, I introduced a test-suite in my cabal file and it build-depends
on hunit ==1.2.*
. The problem is when I try to configure:
$ cabal configure --enable-tests
Resolving dependencies...
Configuring MyProject-0.1.0.0...
cabal: At least the following dependencies are missing:
hunit ==1.2.*
A few more attempts to get it to come around:
$ cabal install --dependencies-only
Resolving dependencies...
All the requested packages are already installed:
Use --reinstall if you want to reinstall anyway.
&
$ cabal install hunit
Resolving dependencies...
All the requested packages are already installed:
HUnit-1.2.5.2
Use --reinstall if you want to reinstall anyway.
&
$ cabal install --enable-tests
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: MyProject-0.1.0.0 (user goal)
rejecting: MyProject-0.1.0.0:!test (global constraint requires opposite flag selection)
trying: MyProject-0.1.0.0:*test
next goal: hunit (dependency of MyProject-0.1.0.0:*test)
fail (unknown package: hunit)
Dependency tree exhaustively searched.
--reinstall
ing did nothing.
I even played with the --user
and --global
flags, even tho I'm using cabal
and not runhaskell
, it doesn't help it.
I also tried to delete
& re-init
the sandbox.
I tried just delete
ing the sandbox too, and it still gave me the same error.ghc-pkg check
finds nothing wrong.
What could it be?
By the way a part of me is suspicious that cabal ignores that my project is in a sandbox, since it didn't bother to install some packages that were already on my machine; it does so on my Windows (this is on Ubuntu). Is it possible to get that checked?
Ubuntu 14.04.1 LTS
GHC version: 7.6.3
cabal-install version: 1.20.0.3
Cabal library version: 1.20.0.2
Also tried now with cabal-install 1.16.0.2 without success.
cabal install --enable-tests
? – Mark Whitfieldcabal install
does a configure. Pass it the configuration flags you need. – Carlhunit
is an unknown package now..? I've updated the question with the details. – MasterMastic