Skip to content

Conversation

@arjunkathuria
Copy link

@arjunkathuria arjunkathuria commented Jun 9, 2023

This PR enables and upgrades Euler-hs repo to be able build with newer GHC 9.2.7, using nix.

Key changes include

  1. Use updated juspay dependencies (which were in-turn patched to be able to build with GHC 9.2.7) like sequelize, hedis, tinylog etc.
  2. Code changes in this project, needed to build after breaking changes and major library version upgrades for eg. aeson 1.x -> aeson 2.x and others.
  3. Nix flake build setup, compatible with updated haskell-flake 0.4.0 syntax.
  4. Patched tests code to be able to build with GHC 9.2.7
  5. Adds some basic QoL improvements like an envrc file to make it work with direnv, updated gitignore, new cabal.project file etc

and more.

Arjun Kathuria and others added 13 commits December 26, 2022 13:54
* marshall or convert between some types where necessary
* provide type-hints where necessary
* Mirgrate from old Aeson < 1.5 syntax to new Aeson > 2.0.1 syntax
* Marshall types and functions as required
* Remove version bounds (to be taken from stack)
* Adds warning for ambiguous fields instead of being a build error
* Removes deprecated function imports from Euler-hs from test-suite
* Newer version of Upstram Beam library demands that
  we use fixed sized integer types like "Int64" or "Int32",
  instead of the machine-dependent Integer type "Int"

* Make changes to test-suite that fix & reflect the above
  requirement.
* The order of key-fields of a few encoded JSON bytestrings
  needed to be shuffled around a little in the test-suite.

* It now expects fields be in alphabetical order after all the
  updates (probably Aeson in particular), i think.
* makes some build-errors warnings instead in some source files

* These build-errors prevented the project to build with GHC 9.2.5

* They can be turned into warnings for now
  (since the code has always been this way)
  The new GHC update just started treating them as build-errors.

* These can be dealt with in a new iteration later.
* There was a parse-error in cabal.project file with haskell-flake
  i think.

* Added a new line, since thats what the parser expects and it is
  identically the same as before.
* Adds ".envrc" file the enables using direnv to load the
  flake environment

* Use "direnv allow" to activate it as usual
* Updates .gitignore file to ignore .direnv and
  result folder.
* Adds flake.nix with nix setup ready to build Euler-hs with GHC-9.2.7

* flake.nix uses the newer haskell-flake 0.4.0 (unreleased) syntax
  , by way of common repo

* Adds the corresponding flake.lock file
@arjunkathuria
Copy link
Author

cc: @aravindgopall

@srid
Copy link
Member

srid commented Jun 23, 2023

@arjunkathuria Why is this PR not targeting master (which is what nammayatri uses in effect)?

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