Closed freeman42x closed 6 years ago
trifecta
depends on parsers
, so currently that kind of setup doesn't work.
rejecting: trifecta-1.7.1.1, trifecta-1.7.1, trifecta-1.7, trifecta-1.6.2.1,
trifecta-1.6.2, trifecta-1.6.1 (cyclic dependencies; conflict set: parsers,
trifecta)
With sandboxes you could cabal install
, cabal install trifecta
, and then reconfigure parsers
with --enable-tests
. That what stack
does under the hood.
@phadej I did something like that earlier - since it mentioned the package was broken - with --force-reinstalls and then everything built.
Isn't there any way to get cabal to reliably run the tests on cabal test
? Does it have to be done manually like this?
Let me ask this: why are you trying to put a downstream dependency of trifecta
directly into parsers
' test suite? Due to https://github.com/haskell/cabal/issues/1575, that's just asking for trouble.
As @phadej notes in https://github.com/ekmett/parsers/issues/73#issuecomment-378393573, you can sometimes make this work by manually installing the dependencies before configuring your project. But even then it's not always guaranteed to work, as #72 (and https://github.com/bos/vector-binary-instances/pull/8) demonstrate. Cyclic dependencies is simply not a tenable approach at the moment.
I don't know what your intentions are with this project, but my recommendation is to separate the test suite into a separate .cabal
file, like what was done in https://github.com/ekmett/transformers-compat/pull/33 and https://github.com/haskell/primitive/pull/90, and have a single cabal.project
/stack.yaml
file that includes both parsers.cabal
and parsers-tests.cabal
as projects. That way, you'll be able to build trifecta
on top of your local copy of parsers
, and you won't run into cyclic dependencies.
In any case, this is not a bug with parsers
itself, so closing.
@RyanGlScott My intention with the project was to provide some tests/examples for using parsers, and those tests depended on trifecta also. It is unfortunate that in this scenario tests do not work with cabal but work fine with stack.
To reproduce:
Building using
stack test
works fine.