haskell-servant / servant-quickcheck

40 stars 21 forks source link

type constructor or class ‘NoContentVerb’ #71

Closed teto closed 4 years ago

teto commented 4 years ago

when trying to use 0.9 with servant I get

src/Servant/QuickCheck/Internal/HasGenRequest.hs:172:23: error:
    Not in scope: type constructor or class ‘NoContentVerb’
    |
172 |     => HasGenRequest (NoContentVerb (method :: k)) where
    |                       ^^^^^^^^^^^^^
Traceback (most recent call last):

I think it's normal since after verification my servant version is 0.16.2 which is not supported yet. Any plan for support :)

fisx commented 4 years ago

this is two issues:

  1. the upper version bound for servant is too lax (may be fixed with 2.)
  2. lacking support for most recent servant

would you like to submit a PR for either of these, preferably both? :)

teto commented 4 years ago

When I wrote

I think it's normal since after verification my servant version is 0.16.2 which is not supported yet.

That's because I had read https://github.com/haskell-servant/servant-quickcheck/commit/fa9cc110959b67eb676d5a28f485956a42c4feb1#diff-271a521af48d2d499403502d1c3b661dR4

and interpreted it as the last supported version instead of the newest ^^''' but a quick look at the cabal shows I was wrong: version bounds are , servant >=0.15 && <0.18``

Sorry I usually try to contribute but this time I will pass :'(

fisx commented 4 years ago

Sorry I usually try to contribute but this time I will pass :'(

Sure :)

Your ticket is a contribution, and it's appreciated. Let's see who gets annoyed by this enough to fix it. Might even be me, I don't think this is particularly hard.

erewok commented 4 years ago

So, I can compile servant-quickcheck-0.0.9.0 and get all the tests to pass if I build it with servant-0.17 (and servant-client and servant-server).

However, if I build servant-quickcheck-0.0.9.0 against servant-0.16.2, I can reproduce this failure.

What's a good way to help users navigate this? Bump the minimum servant version to 0.17?

fisx commented 4 years ago

Yes, same for me, so I fixed this here: 7926ad6bdb41ca0fa8a0746bd11b1b8293e30c7f

@jkarni I accidentally pushed this to master, but I think it's non-controversial? Are you ok if I make another release these days?

Thanks again @erewok!

teto commented 4 years ago

thanks for the fix. Closing.