-
-
Notifications
You must be signed in to change notification settings - Fork 392
Fix build and tests with GHC-9.4.3 and 9.2.5 #3364
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
Changes from 7 commits
efba374
322c03b
5e51777
b3d0bd2
3e6d8ca
12efbd6
4b5bdb8
f1e2481
eca61d1
4e489cb
362b8d2
23a6279
c359743
c6f1a0a
8a491f5
b474547
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,11 @@ library | |
, process-extras >= 0.7.1 | ||
, text | ||
|
||
if impl(ghc >= 9.2) | ||
build-depends: fourmolu ^>= 0.8.2 | ||
if impl(ghc >= 9.4) | ||
build-depends: fourmolu ^>= 0.9 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a bit confused by exactly why this is done this way (same as #3364 (comment), basically). But if it passes CI I'm fine with it. I'll revisit all these bounds next time I come along to bump the version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Mainly, because I don't know any better. It seemed to be a crude but correct way to get tests pass. I'll be happy if somebody with more knowledge fixes this the right way. |
||
default-language: Haskell2010 | ||
|
||
test-suite tests | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this needed?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, a good question. Without this seemingly unnecessary constraint, Cabal somehow manages to pull
ghc-exactprint-1.6.0
- presumably because there's a dependency of dependency that's asking for it. And CI tests kept failing.With this addition, all the relevant tests passed (that is - at least, until I started applying changes to address suggestions ;).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think this needs to go in the right place. It shouldn't be that hard to figure out. At the very least it needs a clear comment explaining this.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I attempted to find the right place - starting with attempts to put it in
plugins/hls-refactor-plugin
andghcide
. Failed miserably in both cases - tests kept failing. Please feel free to pitch a hand and locate that right place - I don't know nearly enough to dig deeper. I tried to search/grep forexactprint
, and did not come up with anything helpful (besides the above, which did not help either).If you do know that right place, please share. Or, perhaps, create a new PR - I'm already up to my ears in the bog of CI that I don't understand.
The current workaround was prompted by observation that
works.
How would you want me to explain it? Just copy-paste this post into the
.cabal
file?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not necessary, afaict, this worked for me out of the box:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting - perhaps,
index-state
changed since...? Should I updateindex-state
in this PR too?Also, have you tried just
cabal build -w ghc-9.4.3
(to build whatever's there)?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you updated the index-state in cabal.project, you locally need to make sure your global index-state is newer than the one in cabal.project (which you added). So just running
cabal update
in the project or outside of it should do the trick.Yeah, works just the same. It'd be weird if cabal didn't choose the most recent version of 'ghc-exactprint'.