-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: Upgrade to GHC 9.2 #244
Conversation
Note: I don't expect this to work just yet, but we should get closer now that we've removed Selda, and also because more time has passed since my last attempt. |
FWIW, if we're happy using community patches, then I'm not sure we're any more stuck on Servant than on e.g. |
But, given that we're in no particular rush to do this, and, unlike |
I wouldn't say "happy." I definitely don't want to make a habit of this and I'm hopeful the community will address these 2 particular cases soon enough, one way or the other. |
a5e6820
to
2a5cfa1
Compare
Servant has just added support, via a different PR to the one linked here: haskell-servant/servant#1555 |
Cool, thanks for the update. The Servant fix should be in the next |
|
62af671
to
c308966
Compare
Well, this is progress: https://buildkite.com/hackworthltd/primer/builds/350#f7bb3e88-5857-461b-ae92-0a674aab7f42 @brprice Could you take a look at that when you need a break from your modules work? It's not high priority, but I just want to get to the bottom of why this is showing up in |
The tasty-hedgehog issue is because of qfpl/tasty-hedgehog#42 |
OK, I'll take care of this. |
Urrgh, this has annoying interactions. It is easy to keep the status quo at least: GaloisInc/what4#195 (comment) I think we can do a little better, see #349 |
FYI, I'm guessing here, but it looks like GHC 9.2.2 doesn't like one of the recent changes to naming: https://buildkite.com/hackworthltd/primer/builds/396#f1b76d29-053c-46aa-ac49-59c02ecfded8/17-7363 |
From the release notes:
I haven't looked in to why that is. Anyway, one solution is to list out each constructor instead: deriving via Name instance (ToSchema (GlobalName 'ATyCon))
deriving via Name instance (ToSchema (GlobalName 'AValCon))
deriving via Name instance (ToSchema (GlobalName 'ADefName)) |
Regarding 9648a86 — uhh... huh. I did not expect that to be the fix. |
As @georgefst points out, this is indeed a change in GHC 9.0.1. Writing them out explicitly is indeed a solution. However, we can do better. I have pushed a commit to this branch showing how. (Just to get CI working, I'll open a pr on main shortly) I am not sure why I wrote the instance in the way I did, with parentheses, but I am now convinced it was a mistake! I want a context that |
There is now a PR on main: #370 |
See the OP for an update. The good news is that only HLS is blocking us now, but the bad news is that it looks a long way off: haskell/haskell-language-server#2179 |
In case it isn't clear from the OP on haskell/haskell-language-server#2179, there has now been at least one release of HLS with 9.2 support, with those plugins disabled. |
Do you mean 1.7.0.0? Because that doesn't currently build (with https://buildkite.com/hackworthltd/primer/builds/759#cc9401af-eed0-48e3-9e95-185e44e3121d/17-1150 Is there a way to disable those plugins from a Cabal project file or something? |
(Also, in yesterday's build, I bumped Weeder to 2.3.1, which allegedly supports 9.2, but that also failed. I'm not sure what's going on there.) |
Yes, it seems 1.7 is the first with support for GHC 9.2.2.
Yes. e.g:
The simplest way is probably to find HLS's |
As discussed in chat, what @georgefst suggests in parent would require overriding HLS's Cabal project file, which is (as far as I understand it) only possible by effectively duplicating it verbatim, plus the changes we want, and then feeding that to our |
8c088d4
to
8f03eea
Compare
867327f
to
981708e
Compare
We must also bump Weeder to 2.4.0, as it tracks GHC closely. Note that this commit includes workarounds for packages that are not yet ready for GHC 9.2: * protolude: ignore bounds. * cabal-fmt & cabal-edit: build using GHC 8.10.7. HLS is broken in by this commit. We can work around it, but it requires some fairly major changes to the flake that are hopefully only temporary until the next release, so I'll do that in a subsequent commit, to make it easier to revert those changes in the future. Somewhat unrelated, in this commit we also pin fourmolu to 0.6.0, as the latest version (0.7.0) makes some pretty arbitrary formatting changes *again*, and I'm tired of fixing the pre-commit checks every time this happens.
There are quite a few workarounds needed in this PR, but we can now build everything with GHC 9.2.
The HLS workaround included here is to build it from source until the next official release.