Skip to content

Commit 93a5f1b

Browse files
dschrempffendor
andauthored
Cleanup CPPs, remove support for GHC 9.4 (#4567)
* Cleanup CPPs, remove support for GHC 9.4 Closes #4529. Also, - update flake lock - some girl scout changes while trying to understand code * Remove #if MIN_VERSION_ghc(9,4,0) CPP statements * Remove MIN_VERSION_ghc(9,3,0) * Remove MIN_VERSION_ghc(9,5,0) * Remove GLASGOW_HASKELL, and GHC94 from tests * Disable Nix MacOS CI (unused and has upstream issue) * Fix compilation warnings leading to CI errors (unused imports, etc.) * Fix compilation error for GHC 9.10 and up * Fix compilation error for GHC 9.12 * Use 'goldenWithEval' in hls-eval-plugin-tests --------- Co-authored-by: fendor <[email protected]>
1 parent 997a426 commit 93a5f1b

File tree

54 files changed

+286
-2826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+286
-2826
lines changed

.github/generate-ci/gen_ci.hs

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{-# LANGUAGE OverloadedStrings #-}
2-
{-# LANGUAGE RecordWildCards #-}
2+
{-# LANGUAGE RecordWildCards #-}
33

4-
import Control.Monad
5-
import Data.Maybe
4+
import Control.Monad
5+
import Data.Maybe
66

7-
import Data.Aeson hiding ( encode )
8-
import Data.Aeson.Types (Pair)
9-
import qualified Data.Aeson.Key as K
10-
import Data.Yaml
7+
import Data.Aeson hiding (encode)
8+
import qualified Data.Aeson.Key as K
9+
import Data.Aeson.Types (Pair)
10+
import Data.Yaml
1111

12-
import qualified Data.ByteString as BS
12+
import qualified Data.ByteString as BS
1313

14-
import qualified Data.List as L
14+
import qualified Data.List as L
1515

16-
import System.Directory
17-
import System.FilePath
18-
import System.Environment
16+
import System.Directory
17+
import System.Environment
18+
import System.FilePath
1919

2020
-------------------------------------------------------------------------------
2121
-- Configuration parameters
@@ -27,8 +27,8 @@ data Opsys
2727
| Windows deriving (Eq)
2828

2929
osName :: Opsys -> String
30-
osName Darwin = "mac"
31-
osName Windows = "windows"
30+
osName Darwin = "mac"
31+
osName Windows = "windows"
3232
osName (Linux d) = "linux-" ++ distroName d
3333

3434
data Distro
@@ -52,27 +52,25 @@ allDistros = [minBound .. maxBound]
5252

5353
data Arch = Amd64 | AArch64
5454
archName :: Arch -> String
55-
archName Amd64 = "x86_64"
55+
archName Amd64 = "x86_64"
5656
archName AArch64 = "aarch64"
5757

5858
artifactName :: Arch -> Opsys -> String
5959
artifactName arch opsys = archName arch ++ "-" ++ case opsys of
6060
Linux distro -> "linux-" ++ distroName distro
61-
Darwin -> "apple-darwin"
62-
Windows -> "mingw64"
61+
Darwin -> "apple-darwin"
62+
Windows -> "mingw64"
6363

6464
data GHC
65-
= GHC948
66-
| GHC967
65+
= GHC967
6766
| GHC984
6867
| GHC9102
6968
| GHC9122
7069
deriving (Eq, Enum, Bounded)
7170

7271
ghcVersion :: GHC -> String
73-
ghcVersion GHC948 = "9.4.8"
74-
ghcVersion GHC967 = "9.6.7"
75-
ghcVersion GHC984 = "9.8.4"
72+
ghcVersion GHC967 = "9.6.7"
73+
ghcVersion GHC984 = "9.8.4"
7674
ghcVersion GHC9102 = "9.10.2"
7775
ghcVersion GHC9122 = "9.12.2"
7876

@@ -89,34 +87,34 @@ data Stage = Build GHC | Bindist | Test
8987
-------------------------------------------------------------------------------
9088

9189
distroImage :: Distro -> String
92-
distroImage Debian9 = "debian:9"
93-
distroImage Debian10 = "debian:10"
94-
distroImage Debian11 = "debian:11"
95-
distroImage Debian12 = "debian:12"
90+
distroImage Debian9 = "debian:9"
91+
distroImage Debian10 = "debian:10"
92+
distroImage Debian11 = "debian:11"
93+
distroImage Debian12 = "debian:12"
9694
distroImage Ubuntu1804 = "ubuntu:18.04"
9795
distroImage Ubuntu2004 = "ubuntu:20.04"
9896
distroImage Ubuntu2204 = "ubuntu:22.04"
99-
distroImage Mint193 = "linuxmintd/mint19.3-amd64"
100-
distroImage Mint202 = "linuxmintd/mint20.2-amd64"
101-
distroImage Mint213 = "linuxmintd/mint21.3-amd64"
102-
distroImage Fedora33 = "fedora:33"
103-
distroImage Fedora40 = "fedora:40"
104-
distroImage Rocky8 = "rockylinux:8"
97+
distroImage Mint193 = "linuxmintd/mint19.3-amd64"
98+
distroImage Mint202 = "linuxmintd/mint20.2-amd64"
99+
distroImage Mint213 = "linuxmintd/mint21.3-amd64"
100+
distroImage Fedora33 = "fedora:33"
101+
distroImage Fedora40 = "fedora:40"
102+
distroImage Rocky8 = "rockylinux:8"
105103

106104
distroName :: Distro -> String
107-
distroName Debian9 = "deb9"
108-
distroName Debian10 = "deb10"
109-
distroName Debian11 = "deb11"
110-
distroName Debian12 = "deb12"
105+
distroName Debian9 = "deb9"
106+
distroName Debian10 = "deb10"
107+
distroName Debian11 = "deb11"
108+
distroName Debian12 = "deb12"
111109
distroName Ubuntu1804 = "ubuntu1804"
112110
distroName Ubuntu2004 = "ubuntu2004"
113111
distroName Ubuntu2204 = "ubuntu2204"
114-
distroName Mint193 = "mint193"
115-
distroName Mint202 = "mint202"
116-
distroName Mint213 = "mint213"
117-
distroName Fedora33 = "fedora33"
118-
distroName Fedora40 = "fedora40"
119-
distroName Rocky8 = "unknown"
112+
distroName Mint193 = "mint193"
113+
distroName Mint202 = "mint202"
114+
distroName Mint213 = "mint213"
115+
distroName Fedora33 = "fedora33"
116+
distroName Fedora40 = "fedora40"
117+
distroName Rocky8 = "unknown"
120118

121119
distroInstall :: Distro -> String
122120
distroInstall Debian9 = "sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list && sed -i /-updates/d /etc/apt/sources.list && apt-get update && apt-get install -y"
@@ -165,13 +163,13 @@ envVars arch os = object $
165163
baseEnv
166164
++ [ "TARBALL_EXT" .= str (case os of
167165
Windows -> "zip"
168-
_ -> "tar.xz")
166+
_ -> "tar.xz")
169167
, "ARCH" .= str (case arch of
170-
Amd64 -> "64"
168+
Amd64 -> "64"
171169
AArch64 -> "ARM64")
172170
, "ADD_CABAL_ARGS" .= str (case (os,arch) of
173171
(Linux _, Amd64) -> "--enable-split-sections"
174-
_ -> "")
172+
_ -> "")
175173
, "ARTIFACT" .= artifactName arch os
176174
]
177175
++ [ "DEBIAN_FRONTEND" .= str "noninteractive"
@@ -186,21 +184,21 @@ envVars arch os = object $
186184

187185
-- | Runner selection
188186
runner :: Arch -> Opsys -> [Value]
189-
runner Amd64 (Linux _) = ["ubuntu-latest"]
187+
runner Amd64 (Linux _) = ["ubuntu-latest"]
190188
runner AArch64 (Linux _) = ["self-hosted", "Linux", "ARM64", "maerwald"]
191-
runner Amd64 Darwin = ["macOS-13"]
192-
runner AArch64 Darwin = ["self-hosted", "macOS", "ARM64"]
193-
runner Amd64 Windows = ["windows-latest"]
194-
runner AArch64 Windows = error "aarch64 windows not supported"
189+
runner Amd64 Darwin = ["macOS-13"]
190+
runner AArch64 Darwin = ["self-hosted", "macOS", "ARM64"]
191+
runner Amd64 Windows = ["windows-latest"]
192+
runner AArch64 Windows = error "aarch64 windows not supported"
195193

196194
-- | Runner selection for bindist jobs
197195
bindistRunner :: Arch -> Opsys -> [Value]
198-
bindistRunner Amd64 (Linux _) = ["self-hosted", "linux-space", "maerwald"]
196+
bindistRunner Amd64 (Linux _) = ["self-hosted", "linux-space", "maerwald"]
199197
bindistRunner AArch64 (Linux _) = ["self-hosted", "Linux", "ARM64", "maerwald"]
200-
bindistRunner Amd64 Darwin = ["macOS-13"]
201-
bindistRunner AArch64 Darwin = ["self-hosted", "macOS", "ARM64"]
202-
bindistRunner Amd64 Windows = ["windows-latest"]
203-
bindistRunner AArch64 Windows = error "aarch64 windows not supported"
198+
bindistRunner Amd64 Darwin = ["macOS-13"]
199+
bindistRunner AArch64 Darwin = ["self-hosted", "macOS", "ARM64"]
200+
bindistRunner Amd64 Windows = ["windows-latest"]
201+
bindistRunner AArch64 Windows = error "aarch64 windows not supported"
204202

205203
-------------------------------------------------------------------------------
206204
-- Action generatation
@@ -220,7 +218,7 @@ bindistRunner AArch64 Windows = error "aarch64 windows not supported"
220218
-- called 'actionName', located at 'actionPath'
221219
data Action
222220
= Action
223-
{ actionName :: String
221+
{ actionName :: String
224222
, actionDistro :: Distro
225223
}
226224

@@ -259,7 +257,7 @@ instance ToJSON Action where
259257

260258
configAction :: Config -> Maybe Action
261259
configAction (MkConfig Amd64 (Linux d) _) = Just $ Action (distroActionName d) d
262-
configAction _ = Nothing
260+
configAction _ = Nothing
263261

264262
distroActionName :: Distro -> String
265263
distroActionName d = "action-" ++ distroName d
@@ -279,7 +277,7 @@ customAction d st = flip (ghAction stepName (actionPath d)) [] $ case st of
279277
where
280278
stepName = case st of
281279
Build v -> "Build " ++ ghcVersion v
282-
Test -> "Test"
280+
Test -> "Test"
283281
Bindist -> "Bindist"
284282

285283
-------------------------------------------------------------------------------

.github/workflows/nix.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
matrix:
47-
os: [ubuntu-latest, macOS-latest]
47+
# TODO: Fix compilation problems on macOS.
48+
# os: [ubuntu-latest, macOS-latest]
49+
os: [ubuntu-latest]
4850

4951
steps:
5052
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)