Closed ocramz closed 6 months ago
WIP example docstrings using curl should be ported to use hspec-wai
I've ported a few docstrings to doctest, now we can be sure the examples stay in sync with the code :)
There's a bit of code duplication but doctest doesn't seem to follow module imports and I'd rather not import 'http-client' into the main scotty library.
@fumieval have you used doctest before? Do you have an idea for fixing the error in the $setup block that appeared in CI?
On Mon, 4 Dec 2023 at 02:43, Fumiaki Kinoshita @.***> wrote:
@.**** approved this pull request.
— Reply to this email directly, view it on GitHub https://github.com/scotty-web/scotty/pull/354#pullrequestreview-1761474143, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNBDKBG6KYANKIQOPMA7MTYHUTEZAVCNFSM6AAAAABACLACS6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONRRGQ3TIMJUGM . You are receiving this because you authored the thread.Message ID: @.***>
Hmm I'm not quite sure what is going on :/
@fumieval ahh figured this out! it's a GHCi bug, unrelated to doctest. GHCi only recently started supporting multiline imports : https://github.com/scotty-web/scotty/actions/runs/7075697407/job/19258105080?pr=354#step:7:95, related GHC ticket: https://gitlab.haskell.org/ghc/ghc/-/issues/20473
@fumieval I've turned doctest into a pure ()
for GHCs older than 9.4.6 , wdyt? https://github.com/scotty-web/scotty/pull/354/commits/de8d7397068690bf2cb3193023070dea0c4abae0
I'll merge this for now, we can revisit later if needed.
closes #353