# Compiling aeson-1.5 projects on ghc-9.2

**URL:** <https://discourse.haskell.org/t/compiling-aeson-1-5-projects-on-ghc-9-2/7017>\
**Category:** Show and Tell\
**Created:** [July 16, 2023, 2:01pm UTC](https://discourse.haskell.org/t/compiling-aeson-1-5-projects-on-ghc-9-2/7017 "2023-07-16T14:01:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janus](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/janus/32/1060_2.png) [@janus](https://discourse.haskell.org/u/janus)\
**Post date:** [July 16, 2023, 2:01pm UTC](https://discourse.haskell.org/t/compiling-aeson-1-5-projects-on-ghc-9-2/7017/1 "2023-07-16T14:01:01Z")

</div>

@andreabedini in [the `^>=` thread](http://discourse.haskell.org/t/the-operator-in-cabal-files/6938/66):

> someone tell me what dependency versions I need to make [wai-middleware-auth](https://hackage.haskell.org/package/wai-middleware-auth)work.

First off, this is an FP Complete project with Stackage resolvers. But using those would be too easy, so I assume you’re trying to get it to run on newer GHC.

This is an aeson-1.5 project, but aeson-1.5 isn’t compatible with GHC 9.2. I created a patch to enable this compat.

```haskell
janus@gorm /tmp % gh repo clone haskell/aeson
Cloning into 'aeson'...
remote: Enumerating objects: 13259, done.
remote: Counting objects: 100% (2319/2319), done.
remote: Compressing objects: 100% (1046/1046), done.
remote: Total 13259 (delta 1053), reused 2085 (delta 901), pack-reused 10940
Receiving objects: 100% (13259/13259), 40.56 MiB | 13.39 MiB/s, done.
Resolving deltas: 100% (6951/6951), done.
janus@gorm /tmp % cd aeson
janus@gorm /tmp/aeson % gh pr checkout 935
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 15 (delta 7), reused 11 (delta 7), pack-reused 0
Unpacking objects: 100% (15/15), 10.27 KiB | 2.57 MiB/s, done.
From github.com:haskell/aeson
 * [new ref] refs/pull/935/head -> aeson-1.5
Switched to branch 'aeson-1.5'

```

Now you can `cabal get wai-middleware-auth` in e.g. `/tmp`. Put `packages: . /tmp/aeson` in `cabal.project` inside the extracted `wai-middleware-auth`.

I am now able to get a repl with just a few version overrides:

```
 % cabal repl -w ghc-9.2.7 --allow-newer=hoauth2:bytestring,hoauth2:binary,jose:bytestring

```

Please let me know if that works for you.

---

<div class="post-metadata">

**Author:** ![andreabedini](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/andreabedini/32/2201_2.png) [@andreabedini](https://discourse.haskell.org/u/andreabedini)\
**Post date:** [July 17, 2023, 7:47am UTC](https://discourse.haskell.org/t/compiling-aeson-1-5-projects-on-ghc-9-2/7017/2 "2023-07-17T07:47:17Z")

</div>

I appreciate that you took the time to have a look @janus, and I confirm that your solution works for me.

I hope I didn’t unvolutarily communicate a sense of urgency, as that package is not a problem for me anymore. The context in which I had to get that package working was because a colleage had published on Hackage a package depending on `wai-middleware-auth` but cabal could not compile it. I set off to help him ([Missing bounds on wai-middleware-auth · Issue #339 · haskell-infra/hackage-trustees · GitHub](https://github.com/haskell-infra/hackage-trustees/issues/339)), but I had to give up.
