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

Remove unused/deprecated dependencies, include recent GHCs/stack lts in CI config #69

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jhrcek
Copy link

@jhrcek jhrcek commented Sep 24, 2024

Hello 🙂
I'd like to use this package to implement SSO in my app.
But first, I'd like to get some reasonable assurance this package will keep working with more recent GHC versions.
I made the CI green with stack/cabal for all ghc versions from 8.10.7 - 9.8.2 - (see a PR in my fork)

While making the example work with more recent dependencies I also noticed there are few unused dependencies, which can be removed.

I also did some extra-deps shuffling to make sure the examples also work with more recent stack lts resolvers.

@@ -0,0 +1,221 @@
# This GitHub workflow config has been generated by a script via
Copy link
Author

@jhrcek jhrcek Sep 24, 2024

Choose a reason for hiding this comment

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

Adding CI config generated by haskell-ci.
Let me know if you don't like it - I can remove it.
But I have positive experience with it. You just add new ghc version to tested-with field in cabal file and regenerate the config.

@@ -17,19 +17,20 @@ jobs:
strategy:
matrix:
resolver:
- lts-17
Copy link
Author

Choose a reason for hiding this comment

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

Dropped lts based on ghc 8.10.4.
I feel like nowadays it's reasonable to use ghc 8.10.7 as the oldest "tested" version.

@@ -8,8 +8,7 @@ module Main where
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ReaderT, ask, lift,
runReaderT)
import Crypto.Random.AESCtr (AESRNG, makeSystem)
Copy link
Author

@jhrcek jhrcek Sep 24, 2024

Choose a reason for hiding this comment

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

This and following are coming from https://hackage.haskell.org/package/cprng-aes-0.6.1 and https://hackage.haskell.org/package/crypto-random which are both deprecated, superseded by cryton.

oidc-client.cabal Outdated Show resolved Hide resolved
stack.yaml Outdated Show resolved Hide resolved
@jhrcek
Copy link
Author

jhrcek commented Sep 25, 2024

I think it will be best to get rid of scotty-cookie, because more recent versions of scotty have cookie functionality built in. Marking this as a draft until I implement that simplification..

@jhrcek jhrcek marked this pull request as draft September 25, 2024 16:39
@jhrcek jhrcek marked this pull request as ready for review September 30, 2024 06:52
@jhrcek
Copy link
Author

jhrcek commented Sep 30, 2024

Ready for review.
It got rid of scotty-cookie in the examples, because the package has been deprecated some time ago.
Instead the cookie functionality is provided by scotty itselt. But that requires using relatively new version of scotty to work, so I bumped the lower bound of scotty in cabal file, which makes it relatively harder to build the examples with older stack resolvers (too many extra-deps required).

Rather than adding too many extra-deps for older stack resolvers just to make the examples work with stack, I decided to disable building examples with stack resolvers < lts-20. Let me know if you're ok with this tradeoff.

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.

1 participant