haskell-servant/servant-mock

Test suite build failure with servant 0.9

Closed this issue · 6 comments

As seen on the Stackage build server:

Preprocessing test suite 'spec' for servant-mock-0.8.1...
[1 of 2] Compiling Servant.MockSpec ( test/Servant/MockSpec.hs, dist/build/spec/spec-tmp/Servant/MockSpec.o )

test/Servant/MockSpec.hs:69:13: error:
    • No instance for (ToHttpApiData TestHeader)
        arising from a use of ‘toApp’
    • In the first argument of ‘with’, namely ‘(toApp withHeader)’
      In the expression: with (toApp withHeader)
      In a stmt of a 'do' block:
        with (toApp withHeader)
        $ do { it "serves arbitrary response bodies"
               $ do { get "/"
                      `shouldRespondWith`
                        200 {matchHeaders = return $ MatchHeader $ ...} } }

Note that I've temporarily disabled this package from the Stackage nightly builds. Kindly make a PR or ping me once you've released a new version that addresses the issue.

Or, if you prefer, we can simply disable the test suite for servant-mock on Stackage (although I personally find this less preferable).

@DanBurton why whole package is disabled by default, not only the test-suite?

  1. in case the test failure is indicative of a bad package version
  2. because it's easier to forget to turn tests back on; people pay more attention to the issue when the package is missing from builds

@DanBurton FWIW it's easy to forget to turn package on as well, except when you try to use it. It would be nice if there could be a mechanism to add "reminders" to Stackage, e.g. try to add servant-mock back when any version > 0.8.1 is released

This is true. The curation team has in fact discussed adding some sort of "reminders" section to the yaml file so that we'll get some sort of alert when new versions of a given package become available.