Build with ghc-9.2.1 #366
No reviewers
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#366
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "mxxun/ghc-9.2"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Early-stage PR, to check whether this kind of copious CPP is agreeable, and to share partial results if those are useful.
My intention here is to build with 9.0.* and 9.2.* series both, as 9.0.3 might well have breaking changes, and in this case haskell language server's brittany plugin will want a ghc-9.0.3-compatible brittany.
(Possibly brittany should have 0.14.* series dedicated to ghc-9.0.*, and a separate 0.15.* series for ghc-9.2.* support?)
Wow, awesome work!
I would prefer to support only one major version of GHC at a time. Honestly that's really all I have the bandwidth to do. It's unfortunate that doing that makes things worse for HLS. I like your suggestion of maintaining separate versions for different versions of GHC. For instance 0.13.x supports GHC 8.10, 0.14.x supports 9.0, and 0.15.x could support 9.2.
I'm not sure how practical it is for Brittany, but separate conditionally-included modules are more palatable to me than CPP. For example my Splint project has different modules for GHC <= 8.8, 8.10, and >= 9.0:
f06756e738/splint.cabal (L48)
Aha; what do you think of putting a
ghc-9.0.x
branch onto the current master tip, dedicating master onward to ghc-9.2.1, and patching the 9.0.x branch if and when that becomes a problem? This way there'd be no overhead due to CPP or massive duplication, at the possibly-small cost of no updates/backports on the older branch.That sounds reasonable to me.
The solution to this conundrum is probaby: migrate to
ghc-lib-parser-9.2
, which is guaranteed to build withghc 8.10
,9.0
,9.2
and most probably will carry on to9.4
and a few more major versions ofghc
.The best part is that you don't need to do much other than replacing the
ghc
dependency with aghc-lib-parser
dependency.Just a note regarding this migration: brittany heavily relies on
ghc-exactprint
which doesn't depend onghc-lib-parser
yet. Haven't researched whether there are plans to do so (seems reasonable that it could happen at some point though). Ifghc-exactprint
migrates then for brittany it would be easy to migrate indeed.Relevant
ghc-exactprint
issue:The consensus seems to be that
ghc-exactprint
would need to be split up more before migrating toghc-lib
; see: https://github.com/alanz/ghc-exactprint/issues/93#issuecomment-867167997Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.