Scotty-0.20 released

Announcing the latest release of scotty !

This release includes a few bug fixes, new features (WAI applications nested under endpoints! cookie support!) as well as a big refactoring of the ActionT type and the overall exception system as well as a bunch of new tests. Overall the library should be easier to build upon and evolve going forward.

Full changelog:

0.20 [2023.10.02]

Thank you to all contributors who supported and grew this wonderful little web framework throughout the years.

23 Likes

Nice. I use scotty in a hobby project and will try out the new version as soon as it makes it into nixpkgs.

1 Like

I owe @ocramz a huge debt of gratitude for becoming a scotty co-maintainer and working through the enormous backlog of GitHub issues. This release wouldn’t have been possible without the huge amount of work that @ocramz put into the project. Thanks!

15 Likes

Prompted by the recent discussion here about convenience and templates, I thought I would mention that Stack’s ‘central’ templates include two that are Scotty-related:

  • scotty-hello-world. Currently, Stack will work out that the templated package works with snapshot nightly-2023-10-04 (GHC 9.6.3). With other snapshots, you will need to specify scotty-0.20.1 as an extra dep; and
  • scotty-hspec-wai. Stack will work out that it works with lts-12.14 (GHC 9.4.7).
5 Likes

Annnd a quick bugfix release because CI didn’t catch everything everything (thank you @RyanGlScott for flagging issues)

0.20.1 [2023.10.03]

  • remove dependencies on ‘base-compat’ and ‘base-compat-batteries’ (#318)
  • re-add MonadFail (ActionT m) instance (#325)
  • re-add MonadError (ActionT m) instance, but the error type is now specialized to ‘StatusError’ (#325)
  • raise lower bound on base ( > 4.14 ) to reflect support for GHC >= 8.10 (#325).
2 Likes

@RyanGlScott thank you for the kind words! I’m happy to help as I have some bandwidth for open source these days :slight_smile: In turn, I would thank @fumieval for his thoughtful shepherding of the PR, he was instrumental in minimizing breakage and ensuring a consistent interface.

1 Like

@ocramz sorry to chime in after the patch release but it seems you’ve forgot to update the list of supported GHC versions: @hackage/scotty

If your CI setup is adequate, you can use https://github.com/Kleidukos/get-tested to keep the cabal metadata and the CI in sync.

@Kleidukos thanks for the tip, but the cabal file is up to date… https://hackage.haskell.org/package/scotty-0.20/src/scotty.cabal maybe it’s formatted in the wrong way?

Nope, you’re alright

1 Like

All is good now :slight_smile:

1 Like

what was the matter?

Thanks for maintaining scotty!

Maybe a bit related. I’m learning about htmx and so I’m translating their examples in to haskell with blaze-htmx. Then I chose scotty to serve it. GitHub - piq9117/htmx-examples

4 Likes

@int-index how long does it usually take for NixPkgs to pull from upstream? I see it’s still pointing to 0.12.1

Judging by the git history, it’s about 3 to 4 weeks. The last updates are dated Oct 4, Sep 14, Aug 17, Jun 28, Jun 7.

2 Likes