-
Notifications
You must be signed in to change notification settings - Fork 195
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
Conversation
I will bump the version number on my https://github.com/alanz/ghc-exactprint/tree/ghc-9.10 branch (tomorrow) if that will help. |
Done |
thanks alan, that is indeed a help (although of course, we will need a release in due course). @zliu41 with this
|
81dd7c3
to
e8b3415
Compare
e8b3415
to
7b8a41f
Compare
@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 |
Note: you need to use a Cabal-3.12-based pre-release of cabal-install to be able to compile ghc-exactprint. |
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. |
@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 |
@alanz Good point! Let me see how bad it is. And thanks for the notes! |
Heads up all, I am in the process of making the transform API pure, should be making a new ghc-exactprint release soon. |
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). |
I can possibly lend a hand. But tied up from now until then |
as i mentioned above @zliu41 , removing the call to |
@shayne-fletcher Sorry I completely missed your message above 😅 Thanks for helping out! |
7b8a41f
to
015fce2
Compare
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 |
78ffbc9
to
9f0624d
Compare
Sorry for the lack of follow up - I've been on PTO since after ZuriHac. Will try to get back to this as soon as I can. |
The problem I have: before GHC 9.10, However, in 9.10, there's only either |
A concrete example: --input
yes = if x then (f y) else z
--expected
yes = if x then f y else z
--actual, GHC 9.10, extra space before `else`
yes = if x then f y else z Prior to 9.10, all In 9.10, however, the fact that the deltas aren't available may necessitate updating the By the way, I don't know why there's only one extra space in the output before |
I have realised that this is a serious mistake. The intended flow is you work on the original, and just have to use deltas where things change. But this does not work, when there are comments sprinkled around This is what has me stuck in the retrie update. I suspect we need to go back to a version with a span it it always for reference, and optional delta. |
I suspect the best way forward is more long term
But that is likely to leave GHC 9.10.x out in the cold. Or at the least 9.10.1 |
See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12993, a first cut at restoring it. I think it will be pretty non-invasive |
Thanks, looks good. Hopefully this gets into 9.10.x; if not, I can make another attempt in |
Exactly my experience for |
6801faa
to
cf788e2
Compare
Note that Protolude upstream doesn't support GHC 9.10, so we use a (hopefully temporary) fork. Temporary workarounds required: * Disable `hlint`: ndmitchell/hlint#1594 * Disable `cabal-fmt`: input-output-hk/haskell.nix#2205 Signed-off-by: Drew Hess <[email protected]>
Note that Protolude upstream doesn't support GHC 9.10, so we use a (hopefully temporary) fork. Temporary workarounds required: * Disable `hlint`: ndmitchell/hlint#1594 * Disable `cabal-fmt`: input-output-hk/haskell.nix#2205 Signed-off-by: Drew Hess <[email protected]>
798499b
to
49f4728
Compare
49f4728
to
7aafde5
Compare
What's the update with Retrie? What should we be doing here? |
I broke ghc-exactprint for GHC 9.10, so retrie cannot be updated. The fix will be in GHC 9.12, but given hlint builds effectively against GHC master you can try the version at https://github.com/alanz/ghc-exactprint/tree/ghc-head which compiles and passes all tests, using head.hackage, and an update to the 'extra' package. |
upgrade from the ghc-9.8 to the ghc-9.10 api. fixes #1593