Skip to content
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

Integrate stylish-haskell into hls executable with ghc 9.8 #4124

Merged
merged 3 commits into from
Mar 9, 2024

Conversation

jhrcek
Copy link
Collaborator

@jhrcek jhrcek commented Mar 9, 2024

The version of stylish-haskell where @michaelpj added support for ghc 9.8 is on hackage:
https://hackage.haskell.org/package/stylish-haskell-0.14.6.0/changelog
Let's enable it in hls!

@jhrcek jhrcek requested a review from michaelpj as a code owner March 9, 2024 09:13
@@ -8,7 +8,7 @@ packages:
./hls-plugin-api
./hls-test-utils

index-state: 2024-02-25T00:00:00Z
index-state: 2024-03-09T08:17:00Z
Copy link
Collaborator Author

@jhrcek jhrcek Mar 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumping index state just to silence this warning:

Warning: Requested index-state 2024-02-25T00:00:00Z is newer than 
'hackage.haskell.org'! Falling back to older state (2024-02-24T17:42:44Z).

@jhrcek jhrcek requested a review from fendor March 9, 2024 09:32
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little bit confused, why didn't CI report the command cabal test hls-stylish-haskell plugin as failing? https://github.com/haskell/haskell-language-server/blob/master/.github/workflows/test.yml#L170

@jhrcek
Copy link
Collaborator Author

jhrcek commented Mar 9, 2024

Hmm, good question.
What motivated me to open this PR was that I was playing with ghc 9.8 and formatting hs files (with stylish-haskell selected as formatter in hls options) didn't do anything. So I thought "maybe stylish-haskell is not yet enabled". So I looked at hls cabal file and saw if impl(ghc < 9.8.0) and just removed it.
After closer look I see that this conditional is part of common stylishHaskell stanza which is not used anywhere EDIT: used in the haskell-language-server library section to disable integrating stylish plugin into hls executable.

But the plugin itself and its tests were NOT marked as buildable: False that's why you can see its tests running on master. It was just not integrated into hls executable.

@jhrcek jhrcek changed the title Enable stylish-haskell with ghc 9.8 Integrate stylish-haskell into hls executable with ghc 9.8 Mar 9, 2024
@jhrcek jhrcek merged commit c50a0e1 into master Mar 9, 2024
39 checks passed
@michaelpj
Copy link
Collaborator

Oops, I thought I had done this 🤦

@jhrcek jhrcek deleted the jhrcek/enable-stylish-haskell-ghc98 branch March 11, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants