Skip to content

Commit 94ac991

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 90d17fe commit 94ac991

File tree

71 files changed

+58
-3228
lines changed

Some content is hidden

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

71 files changed

+58
-3228
lines changed

.github/workflows/bench.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
ghc: ['8.10.7', '9.2.5']
49+
ghc: ['9.2.5', '9.4.3']
5050
os: [ubuntu-latest]
5151

5252
# This code is fitted to the strategy: assumes Linux is used ... etc,
@@ -104,7 +104,7 @@ jobs:
104104
strategy:
105105
fail-fast: false
106106
matrix:
107-
ghc: ['8.10.7', '9.2.5']
107+
ghc: ['9.2.5', '9.4.3']
108108
os: [ubuntu-latest]
109109
cabal: ['3.6']
110110
example: ['cabal', 'lsp-types']

.github/workflows/caching.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ jobs:
8787
, "9.2.5"
8888
, "9.2.4"
8989
, "9.0.2"
90-
, "8.10.7"
9190
]
9291
os: [ "ubuntu-latest"
9392
, "macOS-latest"
@@ -113,7 +112,7 @@ jobs:
113112
# Fetching from github cache is faster than doing it from hackage
114113
# Sources does not change per ghc and ghc version son only doing it
115114
# for one matrix job (it is arbitrary)
116-
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
115+
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2.5'
117116
name: Download sources
118117
run: |
119118
cabal $cabalBuild --only-download --enable-benchmarks --enable-tests
@@ -128,7 +127,7 @@ jobs:
128127
# We build ghcide with benchs and test enabled to include its dependencies in the cache
129128
# (including shake-bench)
130129
# Only for the same ghc and os used in the bench workflow, so we save cache space
131-
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
130+
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '9.2.5'
132131
name: Build ghcide benchmark
133132
run: |
134133
cabal $cabalBuild ghcide --enable-benchmarks --enable-tests

.github/workflows/flags.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ jobs:
4444
strategy:
4545
fail-fast: true
4646
matrix:
47-
ghc: [ "9.2.5"
47+
ghc: [ "9.4.3"
48+
, "9.2.5"
4849
, "9.0.2"
49-
, "8.10.7"
5050
]
5151
os: [ "ubuntu-latest"
5252
]

.github/workflows/hackage.yml

+3-3
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.2"
44-
, "8.10.7"
43+
ghc: [ "9.2.5"
44+
, "9.0.2"
4545
]
4646
exclude:
4747
- ghc: "9.0.2"
@@ -136,7 +136,7 @@ jobs:
136136
cabal haddock --haddock-for-hackage
137137
138138
- name: "Upload package dist tarball"
139-
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '8.10.7'
139+
if: steps.get-hackage-version.outputs.exists != 'true' && matrix.ghc == '9.2.5'
140140
uses: actions/upload-artifact@v3
141141
with:
142142
name: ${{ matrix.package }}

.github/workflows/test.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ jobs:
6666
, "9.2.4"
6767
, "9.2.3"
6868
, "9.0.2"
69-
, "8.10.7"
7069
]
7170
os: [ "ubuntu-latest"
7271
, "macOS-latest"
@@ -94,9 +93,6 @@ jobs:
9493
- os: ubuntu-latest
9594
ghc: '9.0.2'
9695
test: true
97-
- os: ubuntu-latest
98-
ghc: '8.10.7'
99-
test: true
10096
- os: windows-latest
10197
ghc: '9.4.2'
10298
test: true
@@ -108,9 +104,6 @@ jobs:
108104
- os: windows-latest
109105
ghc: '9.0.2'
110106
test: true
111-
- os: windows-latest
112-
ghc: '8.10.7'
113-
test: true
114107

115108
steps:
116109
- uses: actions/checkout@v3
@@ -270,6 +263,7 @@ jobs:
270263
run: cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-record-fields-plugin --test-options="$TEST_OPTS"
271264

272265
## version needs to be limited since the tests depend on cabal-fmt which only builds using specific ghc versions
266+
## FIXME: this is unsatisfiable!
273267
- if: matrix.test && matrix.ghc == '8.10.7'
274268
name: Test hls-cabal-fmt-plugin test suite
275269
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" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-cabal-fmt-plugin --flag=isolateTests --test-options="$TEST_OPTS"

.gitlab/tar.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source "$CI_PROJECT_DIR/.gitlab/setup.sh"
1010
case "${TARBALL_EXT}" in
1111
zip)
1212
TARBALL_PREFIX="haskell-language-server"
13-
HLS_VERSION="$("$CI_PROJECT_DIR/out/haskell-language-server-8.10.7" --numeric-version)"
13+
HLS_VERSION="$("$CI_PROJECT_DIR/out/haskell-language-server-9.2.5" --numeric-version)"
1414
cd out/
1515
zip "${TARBALL_PREFIX}-${HLS_VERSION}-${TARBALL_ARCHIVE_SUFFIX}.zip" haskell-language-server-*
1616
find . -type f ! -name '*.zip' -delete

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-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Support status (see the support policy below for more details):
2626
| 9.2.(1,2) | [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) | deprecated |
2727
| 9.0.2 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
2828
| 9.0.1 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
29-
| 8.10.7 | [latest](https://github.com/haskell/haskell-language-server/releases/latest) | full support |
29+
| 8.10.7 | [1.9.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.9.0.0) | deprecated |
3030
| 8.10.6 | [1.6.1.0](https://github.com/haskell/haskell-language-server/releases/tag/1.6.1.0) | deprecated |
3131
| 8.10.5 | [1.5.1](https://github.com/haskell/haskell-language-server/releases/tag/1.5.1) | deprecated |
3232
| 8.10.(4,3,2) | [1.4.0](https://github.com/haskell/haskell-language-server/releases/tag/1.4.0) | deprecated |

docs/troubleshooting.md

+1-1
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

+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

+2-2
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
@@ -99,7 +99,7 @@ library
9999
unliftio-core,
100100
ghc-boot-th,
101101
ghc-boot,
102-
ghc >= 8.10,
102+
ghc >= 9.0,
103103
ghc-check >=0.5.0.8,
104104
ghc-paths,
105105
cryptohash-sha1 >=0.11.100 && <0.12,

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

+1-24
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ import System.FilePath
104104
import System.IO.Extra (fixIO, newTempFileWithin)
105105
import Unsafe.Coerce
106106

107-
#if MIN_VERSION_ghc(9,0,1)
108107
import GHC.Tc.Gen.Splice
109108

110109
#if MIN_VERSION_ghc(9,2,1)
@@ -115,11 +114,6 @@ import GHC.Types.TypeEnv
115114
import GHC.Driver.Types
116115
#endif
117116

118-
#else
119-
import HscTypes
120-
import TcSplice
121-
#endif
122-
123117
#if MIN_VERSION_ghc(9,2,0)
124118
import GHC (Anchor (anchor),
125119
EpaComment (EpaComment),
@@ -470,7 +464,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
470464
(guts, details) <- tidyProgram tidy_opts simplified_guts
471465
pure (details, Just guts)
472466

473-
#if MIN_VERSION_ghc(9,0,1)
474467
let !partial_iface = force $ mkPartialIface session details
475468
#if MIN_VERSION_ghc(9,3,0)
476469
ms
@@ -482,10 +475,6 @@ mkHiFileResultCompile se session' tcm simplified_guts = catchErrs $ do
482475
Nothing
483476
#endif
484477

485-
#else
486-
let !partial_iface = force (mkPartialIface session details simplified_guts)
487-
final_iface' <- mkFullIface session partial_iface
488-
#endif
489478
let final_iface = final_iface' {mi_globals = Nothing} -- See Note [Clearing mi_globals after generating an iface]
490479

491480
-- Write the core file now
@@ -626,10 +615,8 @@ generateObjectCode session summary guts = do
626615
session' = hscSetFlags newFlags session
627616
#if MIN_VERSION_ghc(9,4,2)
628617
(outputFilename, _mStub, _foreign_files, _cinfos, _stgcinfos) <- hscGenHardCode session' guts
629-
#elif MIN_VERSION_ghc(9,0,1)
630-
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
631618
#else
632-
(outputFilename, _mStub, _foreign_files) <- hscGenHardCode session' guts
619+
(outputFilename, _mStub, _foreign_files, _cinfos) <- hscGenHardCode session' guts
633620
#endif
634621
(ms_location summary)
635622
fp
@@ -775,7 +762,6 @@ generateHieAsts hscEnv tcm =
775762
-- don't export an interface which allows for additional information to be added to hie files.
776763
let fake_splice_binds = Util.listToBag (map (mkVarBind unitDataConId) (spliceExpressions $ tmrTopLevelSplices tcm))
777764
real_binds = tcg_binds $ tmrTypechecked tcm
778-
#if MIN_VERSION_ghc(9,0,1)
779765
ts = tmrTypechecked tcm :: TcGblEnv
780766
top_ev_binds = tcg_ev_binds ts :: Util.Bag EvBind
781767
insts = tcg_insts ts :: [ClsInst]
@@ -787,19 +773,14 @@ generateHieAsts hscEnv tcm =
787773
Just <$>
788774
#endif
789775
GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm) top_ev_binds insts tcs
790-
#else
791-
Just <$> GHC.enrichHie (fake_splice_binds `Util.unionBags` real_binds) (tmrRenamed tcm)
792-
#endif
793776
where
794777
dflags = hsc_dflags hscEnv
795-
#if MIN_VERSION_ghc(9,0,0)
796778
run ts =
797779
#if MIN_VERSION_ghc(9,2,0) && !MIN_VERSION_ghc(9,3,0)
798780
fmap (join . snd) . liftIO . initDs hscEnv ts
799781
#else
800782
id
801783
#endif
802-
#endif
803784

804785
spliceExpressions :: Splices -> [LHsExpr GhcTc]
805786
spliceExpressions Splices{..} =
@@ -1218,11 +1199,7 @@ parseHeader
12181199
=> DynFlags -- ^ flags to use
12191200
-> FilePath -- ^ the filename (for source locations)
12201201
-> Util.StringBuffer -- ^ Haskell module source text (full Unicode is supported)
1221-
#if MIN_VERSION_ghc(9,0,1)
12221202
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule))
1223-
#else
1224-
-> ExceptT [FileDiagnostic] m ([FileDiagnostic], Located(HsModule GhcPs))
1225-
#endif
12261203
parseHeader dflags filename contents = do
12271204
let loc = mkRealSrcLoc (Util.mkFastString filename) 1 1
12281205
case unP Compat.parseHeader (initParserState (initParserOpts dflags) contents loc) of

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

-5
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,8 @@ import Development.IDE.GHC.Compat as Compat
1919
import Development.IDE.GHC.Compat.Util
2020
import GHC
2121

22-
#if MIN_VERSION_ghc(9,0,0)
2322
import qualified GHC.Driver.Pipeline as Pipeline
2423
import GHC.Settings
25-
#elif MIN_VERSION_ghc (8,10,0)
26-
import qualified DriverPipeline as Pipeline
27-
import ToolSettings
28-
#endif
2924
#if MIN_VERSION_ghc(9,3,0)
3025
import qualified GHC.Driver.Pipeline.Execute as Pipeline
3126
#endif

0 commit comments

Comments
 (0)