Open BinderDavid opened 7 months ago
Hi @BinderDavid I'm interested in taking this up, but I am a beginner in Haskell and have done similar GHC upgrades and CI fixes in other projects. If you are OK with this, please let me know how I should proceed. Also, what is your preferred mode of communication: discord/twitter/email?
Hi @kpadmasola,
Thanks for looking into picking up this issue. For this issue you would mainly have to check whether the project builds with GHC 9.8, and if not then you have to apply some compatibility fixes. After the code typechecks with GHC 9.8 we have to add a tested-with
clause for 9.8 here: https://github.com/BinderDavid/mendel/blob/0d8fbff7e0cffdf448faf892c05269c20c6a81c8/mendel.cabal#L24
And then we have to regenerate the CI Skript using https://github.com/haskell-CI/haskell-ci
Communication w.r.t to the project preferably over GitHub, otherwise you can find my contact details on my website https://binderdavid.github.io, i.e. Mastodon and Email.
Hi @BinderDavid With ghc-9.8.2
, with ghc-lib-parser
version 9.8.2.20240223
, I am getting the following errors with cabal build
Should I try fixing the errors in Mutation.hs and Parser.hs? But if I do that, will it not break with older versions of GHC? Please suggest. Thanks.
You can either choose the easy way or the hard way ;)
The easier way is to keep the dependency on ghc-lib-parser ==9.6.2.20230523,
as it is, and only to update the CI so that the github actions also test whether we can compile the library with ghc version 9.8.
The hard way is to update the dependency to 9.8....
. Then you also have to apply all the changes to the Haskell AST that were merged in the upstream library. But the library should still be compatible with earlier versions of GHC, because the ghc-lib-parser
library is independent of GHC and can be compiled with multiple different GHC versions.
@BinderDavid With ghc-lib-parser ==9.6.2.20230523
, build constraints are violated.
So I guess it is the hard way, then?
@BinderDavid probably a dumb question, but how do I find all the changes to the Haskell AST that were merged in the upstream library ? I looked at this repo: https://github.com/digital-asset/ghc-lib, but it was not obvious to me as there were no release tags or branches corresponding to the version of ghc-lib-parser
@BinderDavid the changes between 9.6.2.20230523
and 9.8.2.20240223
versions seem to be in https://github.com/digital-asset/ghc-lib/compare/cb226de..429b5f6, but I was not able to identify the changes needed to fix the build errors with version 9.8.2.20240223
.
Sorry for being a bit unresponsive :( I asked in the GHC Matrix channel if there is some changelog which records the changes to the AST, but they told me there isn't one. So we can currently only rely on what git tells us. I had hoped that you don't run into those issues, sorry :/ I will try to do some investigation tomorrow.
@BinderDavid Sure, no problem. Please let me know once you identify a suitable approach for making some progress here. Thanks.
Switch to ghc-lib 9.8 and add GHC 9.8 to the tested versions in CI.