Skip to content

Cleanup CPPs, remove support for GHC 9.4 #4567

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

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dschrempf
Copy link
Contributor

Closes #4529.

Also,

  • update flake lock
  • some girl scout changes while trying to understand some code

@dschrempf dschrempf force-pushed the cleanup-cpps-purge-ghc94 branch from 1f5bef2 to 47cc528 Compare April 23, 2025 17:44
@fendor
Copy link
Collaborator

fendor commented Apr 24, 2025

Fyi, in the biweekly HLS meeting, we have discussed to not drop support for 9.4 until the next release 2.11.0.0 which will happen once GHC 9.10.2 is released.

Afterwards, we will drop 9.4 support.

@dschrempf
Copy link
Contributor Author

Thanks for the information! I leave this PR in draft mode for now, but feel free to close it, and I can reopen in due time!

@michaelpj
Copy link
Collaborator

btw you might find this useful: https://www.michaelpj.com/blog/2023/11/20/cpp-partial-evaluation.html

@fendor
Copy link
Collaborator

fendor commented May 23, 2025

@dschrempf since we released HLS 2.11, we are ready to drop support for GHC 9.4 :)

@dschrempf dschrempf force-pushed the cleanup-cpps-purge-ghc94 branch from 47cc528 to 8a5b3b8 Compare May 25, 2025 10:53
@dschrempf dschrempf force-pushed the cleanup-cpps-purge-ghc94 branch from 8a5b3b8 to 026a91c Compare June 1, 2025 14:56
Closes haskell#4529.

Also,
- update flake lock
- some girl scout changes while trying to understand code
@dschrempf dschrempf force-pushed the cleanup-cpps-purge-ghc94 branch from 026a91c to 3e4a801 Compare June 1, 2025 15:23
@dschrempf dschrempf changed the title Cleanup CPPs, begin deprecation of GHC 9.4 Cleanup CPPs, remove support for GHC 9.4 Jun 1, 2025
@dschrempf
Copy link
Contributor Author

dschrempf commented Jun 1, 2025

@fendor I have removed #if MIN_VERSION_ghc(9,4,0) statements, but there are a lot of #if MIN_VERSION_ghc(9,5,0) statement left. Also, this is a bit of a nightmare because stylish-haskell fails to parse some of the amended files having many CPP statements. I had to rearrange two already.

Also, the Nix CI fails for MacOS for a reasons I don't understand. I have to investigate. I do not have more time now, maybe I get to it tomorrow. If you take over, please let me know!

Cheers!

EDIT: Ad Nix failure for MacOS. I am not sure if we should test this in CI.

@dschrempf
Copy link
Contributor Author

dschrempf commented Jun 2, 2025

I tackled all MIN_VERSION_ghc(9,5,...) macros, as well as GLASGOW_HASKELL macros related to GHC 9.4. I also removed GHC 9.4 from the tests.

There is one question left in the tests. At a point we expect "ghc94.expected" (I didn't undertand this, maybe it was wrong in the first place?). I will highlight the code change with a comment.

Also there is a lot more macros a'la MIN_VERSION_ghc(9,6,...) which we also can remove by now, but I don't have any energy left ^^. This PR is HUGE already.

Depending on how the CI will go: I think we should merge this soon, conflicts will be really ugly.

@@ -84,8 +84,8 @@ tests =
evalInFile "T8.hs" "-- >>> 3 `div` 0" "-- divide by zero" -- The default for marking exceptions is False
, goldenWithEval "Applies file LANGUAGE extensions" "T9" "hs"
, goldenWithEval "Evaluate a type with :kind!" "T10" "hs"
, goldenWithEval' "Reports an error for an incorrect type with :kind!" "T11" "hs"
(if ghcVersion >= GHC94 then "ghc94.expected" else "expected")
-- TODO: I do not understand why this is 'ghc94.expected'.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why ghc94.expected?

@@ -44,7 +44,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
# TODO: Fix compilation problems on macOS.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: I remove macOS from the Nix CI.

@dschrempf
Copy link
Contributor Author

I just realized this is PR 4567.

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.

Cleanup CPP in GHC/Orphans.hs
3 participants