Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from LTS 18.18 to 19.17 and fix all breaking changes #81

Merged
merged 6 commits into from
Aug 16, 2022

Conversation

rkrzr
Copy link
Contributor

@rkrzr rkrzr commented Aug 16, 2022

This PR upgrades the stackage snapshot from 18.18 to 19.17.

This implies a GHC upgrade from 8.10 to 9.0.

There were breaking changes in two libraries:

  • Web.JWT has split the Signer datatype into two versions: EncodeSigner and VerifySigner. The former is used to encode
    newly minted tokens, while the latter is used to verify signed tokens.

  • Data.Aeson has hidden the HashMap type behind a KeyMap type which only exposes alterF instead of alter and adjust. I added the last two functions to keep the rest of the code the same.

All the tests are passing again.

rkrzr added 6 commits August 7, 2022 20:59
And also bump raven-haskell to the latest version.
The latest version of Web.JWT has split the Signer datatype into
two versions: EncodeSigner and VerifySigner. The former is used to encode
newly minted tokens, while the latter is used to verify signed tokens.

I have updated the usage sites everywhere to use the right kind of token.
Shorter definition of alter
This required using EncodeSigner and VerifySigner in the right places
We now have to use KeyMap instead of HashMap
@rkrzr rkrzr requested a review from alex-mckenna August 16, 2022 07:12
Copy link

@alex-mckenna alex-mckenna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice that the needed fixes were few and pretty mechanical 🎉

@@ -13,7 +13,7 @@ import AccessControl
import JwtAuth

data Config = Config
{ configJwtSecret :: Maybe JWT.Signer
{ configJwtSecret :: Maybe JWT.EncodeSigner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be a good idea to include a comment for this field so it's clear what it means if an EncodeSigner is not provided (similar to the comment already in server/src/Config.hs

@rkrzr rkrzr merged commit 0d7ad47 into master Aug 16, 2022
@rkrzr rkrzr deleted the lts-19.17 branch August 16, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants