Food for thought: supporting only the latest GHC version #3192
Replies: 3 comments 8 replies
-
One question: do you meant that HLS HEAD develops against GHC HEAD, or HLS HEAD develops against the latest relased GHC? The latter would be much less painful, and I think get us most of the benefit of only working on a single major GHC version. Initial support would look a bit like it does today: we have to wait a bit after the release of GHC X until enough of the ecosystem works that we can actually build HLS, then we can switch to it. Targeting GHC HEAD doesn't seem feasible given how many dependencies HLS has. head.hackage is good and all, but we'd be expecting a lot more from it than it is currently capable of. I think in principle targeting the latest released GHC only could work if we were willing to backport a lot (and do releases from old branches!). I think we would have to do that because:
In fact, I think the old branches would in practice have to be active development branches. So fundamentally what this would do is move us from having one branch with some CPP, to multiple branches with no CPP. But then the contribution workflow is maybe worse: I don't love CPP but I really don't love the idea of having to land patches on multiple branches that might have diverged. And in practice we don't have that much CPP: a quick count shows 94 files with CPP out of 1318 in the repository. |
Beta Was this translation helpful? Give feedback.
-
During the upgrade to GHC 9.2 and 9.4, a lot of CPP were added here and there. For the initial support of a GHC version, that's good enough, as it really takes a lot of work. But maybe we need to invest more time in cleaning up the existing CPPs and try our best to move them into their own modules. |
Beta Was this translation helpful? Give feedback.
-
I'm coming around to this a bit more over time. It really would make our lives a lot easier. A few more thoughts:
|
Beta Was this translation helpful? Give feedback.
-
What would happen if HLS HEAD only supported the latest GHC version and we kept branches to back port fixes to previous releases? I am not suggesting that we make this change now, but it's worth sketching for long term planning.
Extended example of how this would work:
The benefit would be removing all GHC Compat stuff and related CPP. This would:
But it would also have serious downsides and obstacles:
cabal install
Hackage builds would not work due to head.hackageThis is a thought that came up in discussions with @david-christiansen during ICFP.
Beta Was this translation helpful? Give feedback.
All reactions