Description
Describe the bug
I have a "top-level" directory that contains opaleye.cabal
. The directory contains a subdirectory called opaleye-sqlite
which contains opaleye-sqlite.cabal
. The latter is, by design, not buildable.
If I run cabal v2-configure --with-ghc=<8.4.4>
then all is well. It builds opaleye.cabal
as expected.
If I run cabal v2-configure --with-ghc=<8.6.5>
then it also tries to build opaleye-sqlite.cabal
. I don't want it to! The build fails, as expected.
...
cabal: Could not resolve dependencies:
[__0] trying: opaleye-0.6.7004.2 (user goal)
[__1] trying: transformers-0.5.6.2/installed-0.5.6.2 (dependency of opaleye)
[__2] trying: contravariant-1.5.2 (dependency of opaleye)
[__3] trying: base-4.12.0.0/installed-4.12.0.0 (dependency of opaleye)
[__4] next goal: opaleye-sqlite (user goal)
[__4] rejecting: opaleye-sqlite-0.0.1.0 (conflict: contravariant==1.5.2,
opaleye-sqlite => contravariant>=1.2 && <1.5)
[__4] skipping: opaleye-sqlite-0.0.0.1, opaleye-sqlite-0.0.0.0 (has the same
characteristics that caused the previous version to fail: excludes
'contravariant' version 1.5.2)
[__4] fail (backjumping, conflict set: contravariant, opaleye-sqlite)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: contravariant, transformers, base,
opaleye, opaleye-sqlite
Try running with --minimize-conflict-set to improve the error message.
To Reproduce
- Clone Opaleye from https://github.com/tomjaguarpaw/haskell-opaleye
- Run
cabal v2-configure --with-ghc=<your GHC 8.4.4>
. It will succeed. - Run
cabal v2-configure --with-ghc=<your GHC 8.6.5>
. It will fail with the error above. rm opaleye-sqlite/opaleye-sqlite.cabal
- Run
cabal v2-configure --with-ghc=<your GHC 8.6.5>
. It will succeed, because it no longer tries to buildopaleye-sqlite/opaleye-sqlite.cabal
.
Expected behavior
I expected that when using GHC 8.6.5 it only try to build opaleye.cabal
(like it did with GHC 8.4.4) not opaleye-sqlite/opaleye-sqlite.cabal
too.
It seems to be looking into subdirectories, and I'm not sure why. I'm also not sure why this depends on GHC version!
System information
Debian Linux 10.3, cabal
3.2.0.0 via ghcp, ghc
8.4.4 from Debian, ghc
8.6.5 from ghcup