servant icon indicating copy to clipboard operation
servant copied to clipboard

cookbook: add jsonerror section

Open domenkozar opened this issue 7 years ago • 5 comments

I have yet to figure out how to build the cabal project for the cookbook.

domenkozar avatar Apr 17 '18 14:04 domenkozar

cabal new-build cookbook-jsonerror should do, I think.

alpmestan avatar Apr 17 '18 14:04 alpmestan

Pushed a few fixed to make sure it compiles.

I'd also like to update .travis.yml to actually test this on CI, but I don't see how its possible to generate the file since https://github.com/haskell-servant/servant/pull/917 landed.

domenkozar avatar Apr 17 '18 18:04 domenkozar

Hmm, I think you just need to mimic e.g doc/cookbook/db-sqlite-simple, i.e have your jsonerror example be handled the same way we handle any other cookbook example. That precise bit of the travis script IIRC isn't generated automatically.

alpmestan avatar Apr 17 '18 22:04 alpmestan

Maybe those backjumps are still needed:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cookbook-pagination-2.1 (user goal)
[__1] next goal: servant-pagination (dependency of cookbook-pagination)
[__1] rejecting: servant-pagination-2.1.0 (conflict: requires
TypeApplications)
[__1] rejecting: servant-pagination-2.0.0, servant-pagination-1.0.0 (conflict:
cookbook-pagination => servant-pagination>=2.1.0 && <3.0.0)
[__1] fail (backjumping, conflict set: cookbook-pagination,
servant-pagination)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: cookbook-pagination,
servant-pagination

domenkozar avatar Apr 18 '18 11:04 domenkozar

Hi @domenkozar! Could you please rebase this PR? We intend to have before the next major release of Servant. :)

tchoutri avatar Nov 17 '21 14:11 tchoutri

I think this should be just part of servant, I'll add a TODO.

domenkozar avatar Jan 06 '24 17:01 domenkozar