Skip to content

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

Open
jhrcek wants to merge 10 commits intokrdlab:masterfrom
jhrcek:jan/rm-unused-deps
Open

Remove unused/deprecated dependencies, include recent GHCs/stack lts in CI config#69
jhrcek wants to merge 10 commits intokrdlab:masterfrom
jhrcek:jan/rm-unused-deps

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.

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.

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.

@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.

@jhrcek jhrcek force-pushed the jan/rm-unused-deps branch from ef070db to a49585f Compare December 16, 2025 12:29
@jhrcek
Copy link
Author

jhrcek commented Dec 16, 2025

Hello @krdlab
Can you please check this PR and let me know if there's anything you're uncomfortable with?
I just updated it to work with all GHCs from 8.10 all the way up to 9.12

What I'd love to get merged:

  • pruning unused dependencies
  • making everything build with latest versions of ghc and dependencies

What I consider as optional (and can remove from this PR if you prefer).

  • adding github actions config generated by haskell-ci (though I consider that nice complement to stack based CI, as it's cheap to maintain).

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