Skip to content

Commit 861aba7

Browse files
authored
Drop support for GHC 8.10 (#3434)
* Drop support for 8.10 * Fixes * Try to fix wrapper test * Try to fix wrapper test * Fix
1 parent bfaecfd commit 861aba7

File tree

63 files changed

+114
-3219
lines changed

Some content is hidden

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

63 files changed

+114
-3219
lines changed

.github/workflows/bench.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
fail-fast: false
4848
matrix:
4949
ghc:
50-
- '8.10'
5150
- '9.2'
51+
- '9.4'
5252
os:
5353
- ubuntu-latest
5454

@@ -115,7 +115,7 @@ jobs:
115115
strategy:
116116
fail-fast: false
117117
matrix:
118-
ghc: ['8.10', '9.2']
118+
ghc: ['9.2', '9.4']
119119
os: [ubuntu-latest]
120120
cabal: ['3.10']
121121
example: ['cabal', 'lsp-types']

.github/workflows/caching.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
# Fetching from github cache is faster than doing it from hackage
103103
# Sources does not change per ghc and ghc version son only doing it
104104
# for one matrix job (it is arbitrary)
105-
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10'
105+
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2'
106106
name: Download sources
107107
run: |
108108
cabal $cabalBuild --only-download --enable-benchmarks --enable-tests
@@ -117,7 +117,7 @@ jobs:
117117
# We build ghcide with benchs and test enabled to include its dependencies in the cache
118118
# (including shake-bench)
119119
# Only for the same ghc and os used in the bench workflow, so we save cache space
120-
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10'
120+
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2'
121121
name: Build ghcide benchmark
122122
run: |
123123
cabal $cabalBuild ghcide --enable-benchmarks --enable-tests
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[ "9.6", "9.4" , "9.2" , "9.0" , "8.10" ]
1+
[ "9.6", "9.4" , "9.2" , "9.0" ]

.github/workflows/test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
run: cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS"
221221

222222
## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
223-
- if: matrix.test && matrix.ghc == '8.10'
223+
- if: matrix.test && matrix.ghc == '9.2'
224224
name: Test hls-cabal-fmt-plugin test suite
225225
run: cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS" || cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS"
226226

@@ -232,7 +232,7 @@ jobs:
232232
name: Test hls-retrie-plugin test suite
233233
run: cabal test hls-retrie-plugin --test-options="$TEST_OPTS" || cabal test hls-retrie-plugin --test-options="$TEST_OPTS"
234234

235-
- if: matrix.test && matrix.ghc != '8.10' && matrix.ghc != '9.0'
235+
- if: matrix.test && matrix.ghc != '9.0'
236236
name: Test hls-overloaded-record-dot-plugin test suite
237237
run: cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-overloaded-record-dot-plugin --test-options="$TEST_OPTS"
238238

docs/contributing/plugin-tutorial.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ And here is the gist of the algorithm:
3434

3535
## Setup
3636

37-
To get started, let’s fetch the HLS repo and build it. You need at least GHC 8.10 for this:
37+
To get started, let’s fetch the HLS repo and build it. You need at least GHC 9.0 for this:
3838

3939
```
4040
git clone --recursive http://github.com/haskell/haskell-language-server hls

docs/support/ghc-version-support.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Support status (see the support policy below for more details):
3131
| 9.2.(1,2) | [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) | deprecated |
3232
| 9.0.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
3333
| 9.0.1 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
34-
| 8.10.7 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
34+
| 8.10.7 | [2.2.0.0](https://github.com/haskell/haskell-language-server/releases/tag/2.2.0.0) | full support |
3535
| 8.10.6 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
3636
| 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated |
3737
| 8.10.(4,3,2) | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
@@ -42,7 +42,6 @@ Support status (see the support policy below for more details):
4242
| 8.6.5 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | deprecated |
4343
| 8.6.4 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
4444

45-
4645
GHC versions not in the list have never been supported by HLS.
4746
LTS stands for [Stackage](https://www.stackage.org/) Long Term Support.
4847

docs/troubleshooting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ stack install haskell-language-server
189189
You also can leverage `ghcup compile hls`:
190190

191191
```bash
192-
ghcup compile hls -v 1.6.1.0 --ghc 8.10.7
192+
ghcup compile hls -v 1.9.0.0 --ghc 9.2.5
193193
```
194194

195195
### Preprocessors

ghcide-bench/ghcide-bench.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ synopsis: An LSP client for running performance experiments on HLS
1212
description: An LSP client for running performance experiments on HLS
1313
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
1414
bug-reports: https://github.com/haskell/haskell-language-server/issues
15-
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.5
15+
tested-with: GHC == 9.0.2 || == 9.2.5
1616

1717
source-repository head
1818
type: git

ghcide/ghcide.cabal

+4-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description:
1313
A library for building Haskell IDE's on top of the GHC API.
1414
homepage: https://github.com/haskell/haskell-language-server/tree/master/ghcide#readme
1515
bug-reports: https://github.com/haskell/haskell-language-server/issues
16-
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.5
16+
tested-with: GHC == 9.0.2 || == 9.2.5
1717
extra-source-files: README.md CHANGELOG.md
1818
test/data/**/*.project
1919
test/data/**/*.cabal
@@ -44,7 +44,6 @@ library
4444
default-language: Haskell2010
4545
build-depends:
4646
aeson,
47-
aeson-pretty,
4847
array,
4948
async,
5049
base == 4.*,
@@ -104,7 +103,7 @@ library
104103
unliftio-core,
105104
ghc-boot-th,
106105
ghc-boot,
107-
ghc >= 8.10,
106+
ghc >= 9.0,
108107
ghc-check >=0.5.0.8,
109108
ghc-paths,
110109
cryptohash-sha1 >=0.11.100 && <0.12,
@@ -228,6 +227,7 @@ library
228227
-Wall
229228
-Wincomplete-uni-patterns
230229
-Wno-unticked-promoted-constructors
230+
-Wunused-packages
231231
-fno-ignore-asserts
232232

233233
if flag(ghc-patched-unboxed-bytecode)
@@ -254,9 +254,6 @@ library
254254
if impl(ghc >= 9.2) && flag(pedantic)
255255
ghc-options: -Wwarn=ambiguous-fields
256256

257-
if impl(ghc >= 9)
258-
ghc-options: -Wunused-packages
259-
260257
if flag(ekg)
261258
build-depends:
262259
ekg-wai,
@@ -397,10 +394,8 @@ test-suite ghcide-tests
397394
record-hasfield
398395
if impl(ghc < 9.3)
399396
build-depends: ghc-typelits-knownnat
400-
if impl(ghc >= 9)
401-
ghc-options: -Wunused-packages
402397
hs-source-dirs: test/cabal test/exe test/src
403-
ghc-options: -threaded -Wall -Wno-name-shadowing -O0 -Wno-unticked-promoted-constructors
398+
ghc-options: -threaded -Wall -Wno-name-shadowing -O0 -Wno-unticked-promoted-constructors -Wunused-packages
404399
main-is: Main.hs
405400
other-modules:
406401
Development.IDE.Test.Runfiles

ghcide/session-loader/Development/IDE/Session.hs

-1
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,6 @@ emptyHscEnv :: IORef NameCache -> FilePath -> IO HscEnv
768768
#endif
769769
emptyHscEnv nc libDir = do
770770
env <- runGhc (Just libDir) getSession
771-
initDynLinker env
772771
pure $ setNameCache nc (hscSetFlags ((hsc_dflags env){useUnicode = True }) env)
773772

774773
data TargetDetails = TargetDetails

ghcide/src/Development/IDE/Core/Compile.hs

+4-27
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,9 @@ import System.IO.Extra (fixIO, newTempFileWithin)
108108

109109
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
110110

111-
#if !MIN_VERSION_ghc(9,0,1)
112-
import HscTypes
113-
import TcSplice
114-
#endif
115-
116-
#if MIN_VERSION_ghc(9,0,1)
117111
import GHC.Tc.Gen.Splice
118-
#endif
119112

120-
#if MIN_VERSION_ghc(9,0,1) && !MIN_VERSION_ghc(9,2,1)
113+
#if !MIN_VERSION_ghc(9,2,1)
121114
import GHC.Driver.Types
122115
#endif
123116

@@ -525,7 +518,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
525518
(guts, details) <- tidyProgram tidy_opts simplified_guts
526519
pure (details, guts)
527520

528-
#if MIN_VERSION_ghc(9,0,1)
529521
let !partial_iface = force $ mkPartialIface session
530522
#if MIN_VERSION_ghc(9,5,0)
531523
(cg_binds guts)
@@ -540,11 +532,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
540532
#if MIN_VERSION_ghc(9,4,2)
541533
Nothing
542534
#endif
543-
544-
#else
545-
let !partial_iface = force (mkPartialIface session details simplified_guts)
546-
final_iface' <- mkFullIface session partial_iface
547-
#endif
548535
let final_iface = final_iface' {mi_globals = Nothing, mi_usages = filterUsages (mi_usages final_iface')} -- See Note [Clearing mi_globals after generating an iface]
549536

550537
-- Write the core file now
@@ -693,10 +680,8 @@ generateObjectCode session summary guts = do
693680
session' = hscSetFlags newFlags session
694681
#if MIN_VERSION_ghc(9,4,2)
695682
(outputFilename, _mStub, _foreign_files, _cinfos, _stgcinfos) <- hscGenHardCode session' guts
696-
#elif MIN_VERSION_ghc(9,0,1)
697-
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
698683
#else
699-
(outputFilename, _mStub, _foreign_files) <- hscGenHardCode session' guts
684+
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
700685
#endif
701686
(ms_location summary)
702687
fp
@@ -839,7 +824,6 @@ generateHieAsts hscEnv tcm =
839824
-- don't export an interface which allows for additional information to be added to hie files.
840825
let fake_splice_binds = Util.listToBag (map (mkVarBind unitDataConId) (spliceExpressions $ tmrTopLevelSplices tcm))
841826
real_binds = tcg_binds $ tmrTypechecked tcm
842-
#if MIN_VERSION_ghc(9,0,1)
843827
ts = tmrTypechecked tcm :: TcGblEnv
844828
top_ev_binds = tcg_ev_binds ts :: Util.Bag EvBind
845829
insts = tcg_insts ts :: [ClsInst]
@@ -851,19 +835,14 @@ generateHieAsts hscEnv tcm =
851835
Just <$>
852836
#endif
853837
GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm) top_ev_binds insts tcs
854-
#else
855-
Just <$> GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm)
856-
#endif
857838
where
858839
dflags = hsc_dflags hscEnv
859-
#if MIN_VERSION_ghc(9,0,0)
860840
run _ts = -- ts is only used in GHC 9.2
861841
#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
862842
fmap (join . snd) . liftIO . initDs hscEnv _ts
863843
#else
864844
id
865845
#endif
866-
#endif
867846

868847
spliceExpressions :: Splices -> [LHsExpr GhcTc]
869848
spliceExpressions Splices{..} =
@@ -1258,10 +1237,8 @@ parseHeader
12581237
-> Util.StringBuffer -- ^ Haskell module source text (full Unicode is supported)
12591238
#if MIN_VERSION_ghc(9,5,0)
12601239
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule GhcPs))
1261-
#elif MIN_VERSION_ghc(9,0,1)
1262-
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule))
12631240
#else
1264-
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule GhcPs))
1241+
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule))
12651242
#endif
12661243
parseHeader dflags filename contents = do
12671244
let loc = mkRealSrcLoc (Util.mkFastString filename) 1 1
@@ -1774,4 +1751,4 @@ pathToModuleName = mkModuleName . map rep
17741751
GHC numbers is identical, with the only preference being to use what is
17751752
already there. (i.e. (`MIN_VERSION_GHC(9,2,0)` and `MIN_VERSION_GHC(9,1,0)`
17761753
are functionally equivalent)
1777-
-}
1754+
-}

ghcide/src/Development/IDE/GHC/CPP.hs

+1-8
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,9 @@ import GHC
2121

2222
-- See Note [Guidelines For Using CPP In GHCIDE Import Statements]
2323

24-
#if MIN_VERSION_ghc (8,10,0) && !MIN_VERSION_ghc(9,0,0)
25-
import qualified DriverPipeline as Pipeline
26-
import ToolSettings
27-
#endif
28-
29-
#if MIN_VERSION_ghc(9,0,0)
3024
import GHC.Settings
31-
#endif
3225

33-
#if MIN_VERSION_ghc(9,0,0) && !MIN_VERSION_ghc(9,3,0)
26+
#if !MIN_VERSION_ghc(9,3,0)
3427
import qualified GHC.Driver.Pipeline as Pipeline
3528
#endif
3629

0 commit comments

Comments
 (0)