Skip to content

GHC 9.2.8 Upgrade for medea#18

Open
arjunkathuria wants to merge 7 commits intojuspay:masterfrom
arjunkathuria:ghc928-upgrade
Open

GHC 9.2.8 Upgrade for medea#18
arjunkathuria wants to merge 7 commits intojuspay:masterfrom
arjunkathuria:ghc928-upgrade

Conversation

@arjunkathuria
Copy link

This PR Upgrades and enables the repo to support an build with GHC 9.2.8 and it's related package set.

This is done as a part of the larger upgrade process, to which, this repo is a dependency.

Key changes include:-

  1. Update the repo to be able to build with GHC 9.2.8.
  2. Update the stack resolver to lts-20.26 (newest resolver with GHC 9.2.8)
  3. Handle breaking changes arising from the upgrade.
  4. Fix the broken test-suite after upgrade.
  5. Update the cabal file:
    • Remove version bounds from dependency packages.
  6. Adds a new cabal.project file.
  7. Cleanup and other housekeeping
    • remove now redundant import statements and code.
    • update the package version to 1.3.0 in cabal file.
    • update the CHANGELOG.md file with the relevant entry.

This commit fixes the breaking changes that come with Aeson V2.x update
while upgrading to GHC 9.2.8 and related package set.

Aeson Changed the internal representation of Object from HashMap -> newer KeyMap.

The choice here was to:-
1. Change the underlying internal representation of `ObjectF`
   from HashMap to KeyMap

2. Do conversions between HashMap and KeyMap
   at endpoints or nodal code that requires it.

In order to keep the changes and downstream breakage minimal,
approach 2 of conversion where required was chosen.
This commit fixes the compilation error where it reported that
`ValidJSONF` type was missing an `Eq` type-class instance,
owing to the `Hashable` instance of `ValidJSONF`

Adds the required `Eq` instance to the type's already existing
type-class derivation list.
This commit fixes broken project test-suite after the upgrade.
There were the usual Aeson V2.x breakages.

Main changes:
* Convert between `HashMap` <-> `KeyMap` type as required
* Convert between keys from `Text` <-> `Key` type for `KeyMap` keys
* Add relevant import statements to import these data types and functions
This commit updates the stackage resolver to lts-20.26, the lastest one
with ghc 9.2.8 in stack.yaml file.

It upgrades to that from the previous 15.15, which is very old. (GHC 8.8.x)

Main changes:
* Updates resolver to lts-20.26, GHC 9.2.8 set.
* Removes older extra dependency pins from extra-deps section
* Adds additional packages to extra-deps section required
  to build with GHC 9.2.8 now (was just one of those)
This commit updates the cabal file of the project to go with
the GHC 9.2.8 upgrade.
It also adds a new "cabal.project" file for better Nix support.

Main changes:
* Updates package version to "1.3.0" from previous "1.2.0"

* Removes version bounds from dependency packages in cabal file.
  These would come from the stack package set or the Nix
  package set, which used with Nix.

* Adds GHC 9.2.8 to 'tested-with' section

* Adds a new cabal.project file to the project,
  for better Nix support.
This commit updates CHANGELOG.md file with the new version
That supports building with GHC 9.2.8

Adds the list of main changes done to get working GHC 9.2.8 support
to project in the CHANGELOG.md file, filed under new version "1.3.0".
This commit cleans up the left-over vestiges of now un-needed code.

This commit removes a now redundant import statement from test-suite.
@arjunkathuria
Copy link
Author

Inquired with Ankur (Euler PM) whom to add as a reviewer for this PR and he mentioned that Aravind is the authority on projects under Juspay github org.

Adding @aravindgopall as a reviewer to request a review and a merge ( i don't seem to have permissions to add to the reviewers section, so tagging in comments )

@arjunkathuria
Copy link
Author

gentle reminder for a review.

cc: @aravindgopall @eswar2001

@arjunkathuria
Copy link
Author

Update: please confirm with me first once before merging it in, it seems it may not be required now to update this.

@srid
Copy link
Member

srid commented May 13, 2025

I believe this can be closed since #19 got merged?

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