Skip to content

Commit 75096d7

Browse files
committed
Drop support for GHC 8.10
Per our support policy, we should now deprecated 8.10. We might not want to do this immediately, but this PR implements it. TODO: - Make sure CI is still all happy - Simplify a lot of bindings that can now just be re-exports
1 parent 8d7555c commit 75096d7

File tree

76 files changed

+109
-3250
lines changed

Some content is hidden

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

76 files changed

+109
-3250
lines changed

.github/workflows/bench.yml

Lines changed: 2 additions & 2 deletions
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

Lines changed: 2 additions & 2 deletions
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

.github/workflows/hackage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040
"hls-qualify-imported-names-plugin", "hls-code-range-plugin",
4141
"hls-cabal-fmt-plugin",
4242
"haskell-language-server"]
43-
ghc: [ "9.0"
44-
, "8.10"
43+
ghc: [ "9.2"
44+
, "9.0"
4545
]
4646
exclude:
4747
- ghc: "9.0"
@@ -133,7 +133,7 @@ jobs:
133133
cabal haddock --haddock-for-hackage
134134
135135
- name: "Upload package dist tarball"
136-
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10'
136+
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.2'
137137
uses: actions/upload-artifact@v3
138138
with:
139139
name: ${{ matrix.package }}
Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ jobs:
236236
run: cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS"
237237

238238
## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
239+
## FIXME: this is unsatisfiable!
239240
- if: matrix.test && matrix.ghc == '8.10'
240241
name: Test hls-cabal-fmt-plugin test suite
241242
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"

docs/contributing/plugin-tutorial.md

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Support status (see the support policy below for more details):
3030
| 9.2.(1,2) | [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) | deprecated |
3131
| 9.0.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
3232
| 9.0.1 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
33-
| 8.10.7 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
33+
| 8.10.7 | [2.0.0.1](https://github.com/haskell/haskell-language-server/releases/tag/2.0.0.1) | full support |
3434
| 8.10.6 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
3535
| 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated |
3636
| 8.10.(4,3,2) | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
@@ -41,7 +41,6 @@ Support status (see the support policy below for more details):
4141
| 8.6.5 | [1.8.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.8.0.0) | deprecated |
4242
| 8.6.4 | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |
4343

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

docs/troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ stack install haskell-language-server
185185
You also can leverage `ghcup compile hls`:
186186

187187
```bash
188-
ghcup compile hls -v 1.6.1.0 --ghc 8.10.7
188+
ghcup compile hls -v 1.9.0.0 --ghc 9.2.5
189189
```
190190

191191
### Preprocessors

ghcide-bench/ghcide-bench.cabal

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 9 deletions
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
@@ -39,7 +39,6 @@ library
3939
default-language: Haskell2010
4040
build-depends:
4141
aeson,
42-
aeson-pretty,
4342
array,
4443
async,
4544
base == 4.*,
@@ -99,7 +98,7 @@ library
9998
unliftio-core,
10099
ghc-boot-th,
101100
ghc-boot,
102-
ghc >= 8.10,
101+
ghc >= 9.0,
103102
ghc-check >=0.5.0.8,
104103
ghc-paths,
105104
cryptohash-sha1 >=0.11.100 && <0.12,
@@ -224,14 +223,12 @@ library
224223
-Wno-name-shadowing
225224
-Wincomplete-uni-patterns
226225
-Wno-unticked-promoted-constructors
226+
-Wunused-packages
227227
-fno-ignore-asserts
228228

229229
if flag(ghc-patched-unboxed-bytecode)
230230
cpp-options: -DGHC_PATCHED_UNBOXED_BYTECODE
231231

232-
if impl(ghc >= 9)
233-
ghc-options: -Wunused-packages
234-
235232
if flag(ekg)
236233
build-depends:
237234
ekg-wai,
@@ -372,10 +369,8 @@ test-suite ghcide-tests
372369
record-hasfield
373370
if impl(ghc < 9.3)
374371
build-depends: ghc-typelits-knownnat
375-
if impl(ghc >= 9)
376-
ghc-options: -Wunused-packages
377372
hs-source-dirs: test/cabal test/exe test/src
378-
ghc-options: -threaded -Wall -Wno-name-shadowing -O0 -Wno-unticked-promoted-constructors
373+
ghc-options: -threaded -Wall -Wno-name-shadowing -O0 -Wno-unticked-promoted-constructors -Wunused-packages
379374
main-is: Main.hs
380375
other-modules:
381376
Development.IDE.Test.Runfiles

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

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ import System.FilePath
110110
import System.IO.Extra (fixIO, newTempFileWithin)
111111
import Unsafe.Coerce
112112

113-
#if MIN_VERSION_ghc(9,0,1)
114113
import GHC.Tc.Gen.Splice
115114

116115
#if MIN_VERSION_ghc(9,2,1)
@@ -121,11 +120,6 @@ import GHC.Types.TypeEnv
121120
import GHC.Driver.Types
122121
#endif
123122

124-
#else
125-
import HscTypes
126-
import TcSplice
127-
#endif
128-
129123
#if MIN_VERSION_ghc(9,2,0)
130124
import GHC (Anchor (anchor),
131125
EpaComment (EpaComment),
@@ -516,7 +510,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
516510
(guts, details) <- tidyProgram tidy_opts simplified_guts
517511
pure (details, guts)
518512

519-
#if MIN_VERSION_ghc(9,0,1)
520513
let !partial_iface = force $ mkPartialIface session
521514
#if MIN_VERSION_ghc(9,5,0)
522515
(cg_binds guts)
@@ -532,10 +525,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
532525
Nothing
533526
#endif
534527

535-
#else
536-
let !partial_iface = force (mkPartialIface session details simplified_guts)
537-
final_iface' <- mkFullIface session partial_iface
538-
#endif
539528
let final_iface = final_iface' {mi_globals = Nothing, mi_usages = filterUsages (mi_usages final_iface')} -- See Note [Clearing mi_globals after generating an iface]
540529

541530
-- Write the core file now
@@ -684,10 +673,8 @@ generateObjectCode session summary guts = do
684673
session' = hscSetFlags newFlags session
685674
#if MIN_VERSION_ghc(9,4,2)
686675
(outputFilename, _mStub, _foreign_files, _cinfos, _stgcinfos) <- hscGenHardCode session' guts
687-
#elif MIN_VERSION_ghc(9,0,1)
688-
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
689676
#else
690-
(outputFilename, _mStub, _foreign_files) <- hscGenHardCode session' guts
677+
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
691678
#endif
692679
(ms_location summary)
693680
fp
@@ -830,7 +817,6 @@ generateHieAsts hscEnv tcm =
830817
-- don't export an interface which allows for additional information to be added to hie files.
831818
let fake_splice_binds = Util.listToBag (map (mkVarBind unitDataConId) (spliceExpressions $ tmrTopLevelSplices tcm))
832819
real_binds = tcg_binds $ tmrTypechecked tcm
833-
#if MIN_VERSION_ghc(9,0,1)
834820
ts = tmrTypechecked tcm :: TcGblEnv
835821
top_ev_binds = tcg_ev_binds ts :: Util.Bag EvBind
836822
insts = tcg_insts ts :: [ClsInst]
@@ -842,19 +828,14 @@ generateHieAsts hscEnv tcm =
842828
Just <$>
843829
#endif
844830
GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm) top_ev_binds insts tcs
845-
#else
846-
Just <$> GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm)
847-
#endif
848831
where
849832
dflags = hsc_dflags hscEnv
850-
#if MIN_VERSION_ghc(9,0,0)
851833
run ts =
852834
#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
853835
fmap (join . snd) . liftIO . initDs hscEnv ts
854836
#else
855837
id
856838
#endif
857-
#endif
858839

859840
spliceExpressions :: Splices -> [LHsExpr GhcTc]
860841
spliceExpressions Splices{..} =
@@ -1267,10 +1248,8 @@ parseHeader
12671248
-> Util.StringBuffer -- ^ Haskell module source text (full Unicode is supported)
12681249
#if MIN_VERSION_ghc(9,5,0)
12691250
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule GhcPs))
1270-
#elif MIN_VERSION_ghc(9,0,1)
1251+
#else
12711252
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule))
1272-
#else
1273-
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule GhcPs))
12741253
#endif
12751254
parseHeader dflags filename contents = do
12761255
let loc = mkRealSrcLoc (Util.mkFastString filename) 1 1

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,8 @@ import Development.IDE.GHC.Compat as Compat
2020
import Development.IDE.GHC.Compat.Util
2121
import GHC
2222

23-
#if MIN_VERSION_ghc(9,0,0)
2423
import qualified GHC.Driver.Pipeline as Pipeline
2524
import GHC.Settings
26-
#elif MIN_VERSION_ghc (8,10,0)
27-
import qualified DriverPipeline as Pipeline
28-
import ToolSettings
29-
#endif
3025

3126
#if MIN_VERSION_ghc(9,5,0)
3227
import qualified GHC.SysTools.Cpp as Pipeline

0 commit comments

Comments
 (0)