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.

24 Likes

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

2 Likes

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!

16 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

5 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

Hi @int-index , I just checked and nixpkgs is still building 0.12 . Hydra - nixpkgs:trunk:haskellPackages.scotty.x86_64-linux Is there a way to nudge it to fetch the latest version ?

@cdepillabout Do you happen to know when nixpkgs will move on from Stackage LTS 21.* to the 22.* series?

We don’t have any specific timeline, but it may happen in the PR after haskellPackages: update stackage and hackage by ncfavier · Pull Request #272097 · NixOS/nixpkgs · GitHub.

The Haskell maintainers in Nixpkgs have been quite busy lately, so I’m not sure when exactly we’ll start the process.

I’d welcome you to join us in https://matrix.to/#/#haskell:nixos.org if you want to help with the move to LTS 22. It is sometimes quite a lot of work to transition to a newer compiler.

2 Likes

Ah thanks @cdepillabout now I get it. I actually don’t even use Nix but was mainly curious about what makes it tick.

1 Like