Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for compatibility with ghc-9.10 #1594

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

shayne-fletcher
Copy link
Collaborator

@shayne-fletcher shayne-fletcher commented May 12, 2024

upgrade from the ghc-9.8 to the ghc-9.10 api. fixes #1593

@shayne-fletcher
Copy link
Collaborator Author

@alanz @zliu41 apply-refact updates (ghc-exactprint > 1.8.0.0) will be needed

@alanz
Copy link
Contributor

alanz commented May 12, 2024

I will bump the version number on my https://github.com/alanz/ghc-exactprint/tree/ghc-9.10 branch (tomorrow) if that will help.
If I have a way of installing the new cabal for github CI, I can make a release

@alanz
Copy link
Contributor

alanz commented May 13, 2024

I will bump the version number

Done

@shayne-fletcher
Copy link
Collaborator Author

I will bump the version number

Done

thanks alan, that is indeed a help (although of course, we will need a release in due course). @zliu41 with this cabal.project file

allow-newer: all
source-repository-package
  type: git
  location: https://github.com/alanz/ghc-exactprint.git
  tag: f334b0c2da5ca9193297e77a9d1fc620f859ffde
packages: apply-refact.cabal

cabal install all produces the errors in this pastebin https://pastebin.com/HyvFvR8R indicating a few fixes to apply-refact source itself will be needed in addition to this.

@alanz
Copy link
Contributor

alanz commented May 16, 2024

https://hackage.haskell.org/package/ghc-exactprint-1.9.0.0

@zliu41
Copy link
Collaborator

zliu41 commented May 19, 2024

cabal install all produces the errors in this pastebin https://pastebin.com/HyvFvR8R indicating a few fixes to apply-refact source itself will be needed in addition to this.

@shayne-fletcher I've fixed these errors but there are many more. I'll continue fixing them over the next week. The working branch is https://github.com/mpickering/apply-refact/tree/ghc-9.10

@alanz
Copy link
Contributor

alanz commented May 19, 2024

Note: you need to use a Cabal-3.12-based pre-release of cabal-install to be able to compile ghc-exactprint.

See https://discourse.haskell.org/t/ann-cabal-3-12-0-0-released/9504#how-to-get-the-cabal-install-pre-release-3

@shayne-fletcher
Copy link
Collaborator Author

shayne-fletcher commented May 20, 2024

cabal install all produces the errors in this pastebin https://pastebin.com/HyvFvR8R indicating a few fixes to apply-refact source itself will be needed in addition to this.

@shayne-fletcher I've fixed these errors but there are many more. I'll continue fixing them over the next week. The working branch is https://github.com/mpickering/apply-refact/tree/ghc-9.10

i hope this saves you some time @zliu41:

on the ghc-9.10.1-fixes branch on my fork https://github.com/shayne-fletcher/apply-refact.git, after making this change, of the 449 tests, the failure count is reduced from 249 to 79.

@alanz
Copy link
Contributor

alanz commented May 20, 2024

@zliu41 given the magnitude of the GHC 9.10.1 upgrade, it might make sense to strip the CPP, and adjust the bounds so the next version only works with GHC 9.10.1 (as originally happened with apply-refact, IIRC).

And my notes on the changes are at https://gist.github.com/alanz/e127e7561ddf1cfeb07fbdee9a966794

@zliu41
Copy link
Collaborator

zliu41 commented May 20, 2024

given the magnitude of the GHC 9.10.1 upgrade, it might make sense to strip the CPP

@alanz Good point! Let me see how bad it is. And thanks for the notes!

@alanz
Copy link
Contributor

alanz commented May 21, 2024

Heads up all, I am in the process of making the transform API pure, should be making a new ghc-exactprint release soon.
See alanz/ghc-exactprint@5e7e8ab

@alanz
Copy link
Contributor

alanz commented May 21, 2024

https://hackage.haskell.org/package/ghc-exactprint-1.10.0.0

@zliu41
Copy link
Collaborator

zliu41 commented May 25, 2024

Update: I've made it build but there are many test failures. Will continue investigating. I don't have an ETA at the moment, but I should have some time to work on it during ZuriHac (if I haven't finished it by then).

@alanz
Copy link
Contributor

alanz commented May 25, 2024

I should have some time to work on it during ZuriHac

I can possibly lend a hand. But tied up from now until then

@shayne-fletcher
Copy link
Collaborator Author

shayne-fletcher commented May 25, 2024

Update: I've made it build but there are many test failures. Will continue investigating. I don't have an ETA at the moment, but I should have some time to work on it during ZuriHac (if I haven't finished it by then).

as i mentioned above @zliu41 , removing the call to makeDeltaAst at line 739 of Internal.hs Right ast -> pure $ Right (makeDeltaAst ast)(on your branch) halves the failure count to 135 of 449 tests.

@zliu41
Copy link
Collaborator

zliu41 commented May 25, 2024

@shayne-fletcher Sorry I completely missed your message above 😅 Thanks for helping out!

@zliu41
Copy link
Collaborator

zliu41 commented Jun 9, 2024

Worked on it for about 2 hours today with the help of @alanz, and reduced the number of test failures from 175 to 172 😅 Will continue later.. looks like a lot more setEntryDPs needed.

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.

cabal install hlint fails with ghc-9.10.1
3 participants