I recently ran into a Cabal issue that I only managed to solve by manually installing transformers-compat with the -f transformers3
flag in my cabal sandbox be
Looks like it's not possible to specify such a dependency via the build-depends
field in your .cabal
file. buildDepends is defined as [Dependency], where data Dependency = Dependency PackageName VersionRange
. You can use cabal install --constraint="transformers-compat +transformers3"
, though.
Looking at the transformers-compat.cabal
file, I think that the solver should be able to figure out the correct flag assignment if you constrain your dependency on transformers
appropriately. E.g. build-depends: transformers >= 0.3 && < 0.4
should force the solver to choose transformers-compat +transformers3
. If this doesn't work, it may be a bug in the solver.