haskell-language-server icon indicating copy to clipboard operation
haskell-language-server copied to clipboard

Make splice plugin compatible with GHC 9.2

Open eddiejessup opened this issue 3 years ago • 3 comments

I don't really know what I'm doing, but I did the minimal amount to make the splice plugin compatible with GHC 9.2.

I import from GHC.Types.Error to extract the warnings and errors, I'm not sure if that's okay, or if the idea is to avoid plugins depending directly on GHC modules?

Good chance I've done something wrong here, feedback welcome.

eddiejessup avatar Apr 03 '22 11:04 eddiejessup

I import from GHC.Types.Error to extract the warnings and errors, I'm not sure if that's okay, or if the idea is to avoid plugins depending directly on GHC modules

We have a compatibility layer in Development.IDE.GHC.Compat but it's quite confusing and it doesn't help much with exactprint types (LocatedAn and friends)

pepeiborra avatar Apr 03 '22 19:04 pepeiborra

@eddiejessup are you able to finish this PR?

pepeiborra avatar Aug 13 '22 09:08 pepeiborra

Hey @pepeiborra, thanks for checking in on this and sorry for not updating the issue. I got this compiling but had some test failures. I spent a bunch of time trying to work them out, I think it's essentially compatibility problems with the new exact printing stuff, but I had a lot of headaches nailing things down.

Maybe what I can do is push what I have, show the failing tests and my understanding so far about what's going wrong? Then I can try to find some time to pick it up again, or if someone else wants to pick it up they can.

eddiejessup avatar Aug 19 '22 18:08 eddiejessup

Hi, very sorry for the long delay on this, but I've found some time to dig into this more, I have all the tests passing on GHC 9.2, though I confess one change is quite ad hoc to get the tests passing.

Though it's to do with spacing, so given the staleness of this plugin, maybe even if we get some problems with extra/missing spaces, at this point maybe that's better than nothing.

Anyway I'm now working on making the changes back-compatible with < 9.2.

eddiejessup avatar Oct 30 '22 09:10 eddiejessup

Some unrelated plugin tests seem to fail in CI, but they pass for me locally. I'm not sure if this is flakiness or something, would appreciate any input on this.

I think apart from that, this work is in a reviewable state. I've added some comments inline to try to explain in more detail.

eddiejessup avatar Oct 30 '22 16:10 eddiejessup

Thank you for the tough work! I'm a bit busy these days, but will review the changes to Splice Plugin until this weekend. I have no idea as for failure on 9.4+Win - I'll retry the job to see if it's just an example of flakey test behaviour.

konn avatar Oct 31 '22 11:10 konn

Do I understand right that the rerun checks are passing? Also I see I need to rebase, I can do that

eddiejessup avatar Nov 02 '22 16:11 eddiejessup

@konn thanks! Do the current reviewers include one or more Exactprint people? Or we should add someone?

eddiejessup avatar Nov 03 '22 07:11 eddiejessup

I'm not sure who is, but I think given the tests all pass this seems like you've probably done a good job. Perhaps @wz1000 or @pepeiborra might want to take a look, but I think we can merge for now and if they have any comments we can address them afterwards. Thanks for fixing this!

michaelpj avatar Nov 03 '22 16:11 michaelpj