Skip to content

Commit fa3e916

Browse files
committed
Merge branch 'master' into anka-213-tactics-ghc90
2 parents 86d63ff + 4386396 commit fa3e916

File tree

51 files changed

+2148
-636
lines changed

Some content is hidden

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

51 files changed

+2148
-636
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
ghc:
22-
[ "9.0.1"
23-
, '8.10.7'
22+
[ "9.2.1"
23+
, "9.0.1"
24+
, "8.10.7"
2425
, "8.10.6"
2526
, "8.8.4"
2627
, "8.6.5"
@@ -56,6 +57,9 @@ jobs:
5657
- name: (GHC 9.0) Use modified cabal.project for GHC 9.0
5758
if: ${{ matrix.ghc == '9.0.1' }}
5859
run: cp cabal-ghc901.project cabal.project
60+
- name: Use modified cabal.project for ghc9.2
61+
if: ${{ matrix.ghc == '9.2.1' }}
62+
run: cp cabal-ghc921.project cabal.project
5963

6064
- name: Shorten binary names
6165
run: |

.github/workflows/caching.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
strategy:
7777
fail-fast: false
7878
matrix:
79-
ghc: [ "9.0.1"
79+
ghc: [ "9.2.1"
80+
, "9.0.1"
8081
, "8.10.7"
8182
, "8.10.6"
8283
, "8.8.4"
@@ -109,20 +110,10 @@ jobs:
109110
110111
# repeating builds to workaround segfaults in windows and ghc-8.8.4
111112
# This build agenda in not to have successful code,
112-
# but to cache what can be cached, so step is fault tolerant & would always succeed.
113-
# 2021-12-11: NOTE: Need to building all targets (build the project also), since
114-
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies` combination
115-
116-
- if: steps.compiled-deps.outputs.cache-hit != 'true' && runner.os == 'Linux' && matrix.ghc == '8.10.7'
117-
name: (For Bench workflow) Build benchmark targets
118-
continue-on-error: true
119-
# Downloaded separately, to match the tested work/PR workflow guarantees
120-
run: |
121-
cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks || cabal $cabalBuild --enable-benchmarks
122-
113+
# but to cache what can be cached, so step is fault tolerant & would always succseed.
114+
# 2021-12-11: NOTE: Building all targets, since
115+
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies`
123116
- if: steps.compiled-deps.outputs.cache-hit != 'true'
124-
name: Build targets; try 3 times
125-
continue-on-error: true
126-
# Done separately, matching the tested work/PR workflow guarantees
117+
name: Build all targets; try 3 times
127118
run: |
128-
cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test || cabal $cabalBuild --enable-test
119+
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild

.github/workflows/test.yml

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
strategy:
5757
fail-fast: true
5858
matrix:
59-
ghc: [ "9.0.1"
59+
ghc: [ "9.2.1"
60+
, "9.0.1"
6061
, "8.10.7"
6162
, "8.10.6"
6263
, "8.8.4"
@@ -66,33 +67,34 @@ jobs:
6667
, "macOS-latest"
6768
]
6869
include:
69-
# only test supported ghc major versions
70-
- os: ubuntu-latest
71-
ghc: '9.0.1'
72-
test: true
73-
- os: ubuntu-latest
74-
ghc: '8.10.7'
75-
test: true
76-
- os: ubuntu-latest
77-
ghc: '8.8.4'
78-
test: true
79-
- os: ubuntu-latest
80-
ghc: '8.6.5'
81-
test: true
82-
- os: windows-latest
83-
ghc: '9.0.1'
84-
test: true
85-
- os: windows-latest
86-
ghc: '8.10.7'
87-
test: true
88-
- os: windows-latest
89-
ghc: '8.6.5'
90-
test: true
91-
# only build rest of supported ghc versions for windows
92-
- os: windows-latest
93-
ghc: '8.10.6'
94-
- os: windows-latest
95-
ghc: '8.8.4'
70+
# only test supported ghc major versions
71+
- os: ubuntu-latest
72+
ghc: '9.2.1'
73+
test: true
74+
- os: ubuntu-latest
75+
ghc: '9.0.1'
76+
test: true
77+
- os: ubuntu-latest
78+
ghc: '8.10.7'
79+
test: true
80+
- os: ubuntu-latest
81+
ghc: '8.8.4'
82+
test: true
83+
- os: ubuntu-latest
84+
ghc: '8.6.5'
85+
test: true
86+
- os: windows-latest
87+
ghc: '9.2.1'
88+
test: true
89+
- os: windows-latest
90+
ghc: '9.0.1'
91+
test: true
92+
- os: windows-latest
93+
ghc: '8.10.7'
94+
test: true
95+
- os: windows-latest
96+
ghc: '8.6.5'
97+
test: true
9698

9799
steps:
98100
- uses: actions/checkout@v2
@@ -144,51 +146,51 @@ jobs:
144146

145147
run: cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper" || cabal test wrapper-test --test-options="$TEST_OPTS --rerun-log-file .tasty-rerun-log-wrapper"
146148

147-
- if: matrix.test
149+
- if: matrix.test && matrix.ghc != '9.2.1'
148150
name: Test hls-brittany-plugin
149151
run: cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
150152

151-
- if: matrix.test
153+
- if: matrix.test && matrix.ghc != '9.2.1'
152154
name: Test hls-floskell-plugin
153155
run: cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
154156

155-
- if: matrix.test
157+
- if: matrix.test && matrix.ghc != '9.2.1'
156158
name: Test hls-class-plugin
157159
run: cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
158160

159161
- if: matrix.test
160162
name: Test hls-pragmas-plugin
161163
run: cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || cabal test hls-pragmas-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-pragmas-plugin --test-options="$TEST_OPTS"
162164

163-
- if: matrix.test
165+
- if: matrix.test && matrix.ghc != '9.2.1'
164166
name: Test hls-eval-plugin
165167
run: cabal test hls-eval-plugin --test-options="$TEST_OPTS" || cabal test hls-eval-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="$TEST_OPTS"
166168

167-
- if: matrix.test
169+
- if: matrix.test && matrix.ghc != '9.2.1'
168170
name: Test hls-haddock-comments-plugin
169171
run: cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="$TEST_OPTS"
170172

171-
- if: matrix.test
173+
- if: matrix.test && matrix.ghc != '9.2.1'
172174
name: Test hls-splice-plugin
173175
run: cabal test hls-splice-plugin --test-options="$TEST_OPTS" || cabal test hls-splice-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="$TEST_OPTS"
174176

175-
- if: matrix.test && matrix.ghc != '9.0.1'
177+
- if: matrix.test && matrix.ghc != '9.0.1' && matrix.ghc != '9.2.1'
176178
name: Test hls-stylish-haskell-plugin
177179
run: cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="$TEST_OPTS"
178180

179-
- if: matrix.test
181+
- if: matrix.test && matrix.ghc != '9.2.1'
180182
name: Test hls-ormolu-plugin
181183
run: cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || cabal test hls-ormolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="$TEST_OPTS"
182184

183-
- if: matrix.test
185+
- if: matrix.test && matrix.ghc != '9.2.1'
184186
name: Test hls-fourmolu-plugin
185187
run: cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="$TEST_OPTS"
186188

187-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
189+
- if: matrix.test && matrix.ghc != '9.2.1'
188190
name: Test hls-tactics-plugin test suite
189191
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
190192

191-
- if: matrix.test
193+
- if: matrix.test && matrix.ghc != '9.2.1'
192194
name: Test hls-refine-imports-plugin test suite
193195
run: cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS"
194196

@@ -200,19 +202,19 @@ jobs:
200202
name: Test hls-call-hierarchy-plugin test suite
201203
run: cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="$TEST_OPTS"
202204

203-
- if: matrix.test
205+
- if: matrix.test && matrix.ghc != '9.2.1'
204206
name: Test hls-rename-plugin test suite
205207
run: cabal test hls-rename-plugin --test-options="$TEST_OPTS" || cabal test hls-rename-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="$TEST_OPTS"
206208

207-
- if: matrix.test
209+
- if: matrix.test && matrix.ghc != '9.2.1'
208210
name: Test hls-hlint-plugin test suite
209211
run: cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || cabal test hls-hlint-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="$TEST_OPTS"
210212

211-
- if: matrix.test
213+
- if: matrix.test && matrix.ghc != '9.2.1'
212214
name: Test hls-alternate-number-format-plugin test suite
213215
run: cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-alternate-number-format-plugin --test-options="$TEST_OPTS"
214216

215-
- if: matrix.test
217+
- if: matrix.test && matrix.ghc != '9.2.1'
216218
name: Test hls-qualify-imported-names-plugin test suite
217219
run: cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-qualify-imported-names-plugin --test-options="$TEST_OPTS"
218220

cabal-ghc921.project

Lines changed: 65 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,38 @@ packages:
1111
-- ./plugins/hls-stylish-haskell-plugin
1212
-- ./plugins/hls-fourmolu-plugin
1313
./plugins/hls-class-plugin
14-
./plugins/hls-eval-plugin
14+
-- ./plugins/hls-eval-plugin
1515
./plugins/hls-explicit-imports-plugin
16-
./plugins/hls-refine-imports-plugin
17-
./plugins/hls-hlint-plugin
16+
-- ./plugins/hls-refine-imports-plugin
17+
-- ./plugins/hls-hlint-plugin
18+
./plugins/hls-rename-plugin
1819
-- ./plugins/hls-retrie-plugin
19-
./plugins/hls-haddock-comments-plugin
20-
-- ./plugins/hls-splice-plugin
20+
-- ./plugins/hls-haddock-comments-plugin
21+
-- ./plugins/hls-splice-plugin
2122
./plugins/hls-qualify-imported-names-plugin
22-
./plugins/hls-floskell-plugin
23+
-- ./plugins/hls-floskell-plugin
2324
./plugins/hls-pragmas-plugin
2425
./plugins/hls-module-name-plugin
25-
./plugins/hls-ormolu-plugin
26+
-- ./plugins/hls-ormolu-plugin
2627
./plugins/hls-call-hierarchy-plugin
27-
./plugins/hls-alternate-number-format-plugin
28+
-- ./plugins/hls-alternate-number-format-plugin
29+
30+
source-repository-package
31+
type: git
32+
location: https://github.com/tfausak/unix-compat
33+
tag: 154c3a63f154cb49c51d5f9d13488e8119631d8a
34+
-- To fix windows build
35+
-- https://github.com/jacobstanley/unix-compat/pull/47
36+
37+
repository head.hackage.ghc.haskell.org
38+
url: https://ghc.gitlab.haskell.org/head.hackage/
39+
secure: True
40+
key-threshold: 3
41+
root-keys:
42+
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
43+
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
44+
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
45+
2846

2947
with-compiler: ghc-9.2.1
3048

@@ -36,11 +54,40 @@ package *
3654

3755
write-ghc-environment-files: never
3856

39-
index-state: 2021-12-29T12:30:08Z
57+
index-state: 2022-01-03T18:45:00Z
4058

4159
constraints:
42-
-- These plugins doesn't work on GHC92 yet
43-
haskell-language-server +ignore-plugins-ghc-bounds -brittany -class -fourmolu -splice -stylishhaskell -tactic -refineImports -callhierarchy -retrie
60+
-- These plugins don't build/work on GHC92 yet
61+
haskell-language-server
62+
+ignore-plugins-ghc-bounds
63+
-alternateNumberFormat
64+
-brittany
65+
-callhierarchy
66+
-class
67+
-eval
68+
-floskell
69+
-fourmolu
70+
-haddockComments
71+
-hlint
72+
-moduleName
73+
-ormolu
74+
-qualifyImportedNames
75+
-refineImports
76+
-retrie
77+
-splice
78+
-stylishhaskell
79+
-tactic
80+
-- the rename plugin builds, but doesn't work
81+
-rename,
82+
ghc-lib-parser ^>= 9.2,
83+
attoparsec ^>= 0.14.3,
84+
ghc-exactprint >= 1.3,
85+
retrie >= 1.2,
86+
direct-sqlite == 2.3.26,
87+
lens >= 5.0.1,
88+
primitive-unlifted ==0.1.3.1,
89+
-- these constraints are for head.hackage
90+
aeson ==1.5.6.0,
4491

4592
allow-newer:
4693
Cabal,
@@ -62,4 +109,10 @@ allow-newer:
62109
dependent-sum:constraints,
63110
diagrams:diagrams-core,
64111
Chart-diagrams:diagrams-core,
65-
SVGFonts:diagrams-core
112+
SVGFonts:diagrams-core,
113+
114+
-- for head.hackage
115+
primitive-unlifted:base
116+
117+
allow-older:
118+
primitive-extras:primitive-unlifted

ghcide/.hlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
- Development.IDE.Spans.AtPoint
115115
- Development.IDE.Spans.Pragmas
116116
- Development.IDE.Plugin.CodeAction
117+
- Development.IDE.Plugin.CodeAction.Args
118+
- Development.IDE.Plugin.CodeAction.ExactPrint
117119
- Development.IDE.Plugin.Completions
118120
- Development.IDE.Plugin.Completions.Logic
119121
- Development.IDE.Types.Location

ghcide/bench/lib/Experiments.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{-# LANGUAGE GADTs #-}
44
{-# LANGUAGE ImplicitParams #-}
55
{-# LANGUAGE ImpredicativeTypes #-}
6+
{-# LANGUAGE PolyKinds #-}
67
{-# OPTIONS_GHC -Wno-deprecations -Wno-unticked-promoted-constructors #-}
78

89
module Experiments
@@ -251,7 +252,7 @@ configP =
251252
<*> option auto (long "timeout" <> value 60 <> help "timeout for waiting for a ghcide response")
252253
<*> ( Example "name"
253254
<$> (Right <$> packageP)
254-
<*> (some moduleOption <|> pure ["Distribution/Simple.hs"])
255+
<*> (some moduleOption <|> pure ["src/Distribution/Simple.hs"])
255256
<*> pure []
256257
<|>
257258
Example "name"
@@ -263,7 +264,7 @@ configP =
263264

264265
packageP = ExamplePackage
265266
<$> strOption (long "example-package-name" <> value "Cabal")
266-
<*> option versionP (long "example-package-version" <> value (makeVersion [3,4,0,0]))
267+
<*> option versionP (long "example-package-version" <> value (makeVersion [3,6,0,0]))
267268
pathP = strOption (long "example-path")
268269

269270
versionP :: ReadM Version

ghcide/ghcide.cabal

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ library
163163
Development.IDE.GHC.Compat
164164
Development.IDE.GHC.Compat.Core
165165
Development.IDE.GHC.Compat.Env
166+
Development.IDE.GHC.Compat.ExactPrint
166167
Development.IDE.GHC.Compat.Iface
167168
Development.IDE.GHC.Compat.Logger
168169
Development.IDE.GHC.Compat.Outputable
@@ -171,6 +172,7 @@ library
171172
Development.IDE.GHC.Compat.Units
172173
Development.IDE.GHC.Compat.Util
173174
Development.IDE.Core.Compile
175+
Development.IDE.GHC.Dump
174176
Development.IDE.GHC.Error
175177
Development.IDE.GHC.ExactPrint
176178
Development.IDE.GHC.Orphans
@@ -409,7 +411,7 @@ test-suite ghcide-tests
409411
tasty-rerun,
410412
text,
411413
unordered-containers,
412-
if (impl(ghc >= 8.6))
414+
if (impl(ghc >= 8.6) && impl(ghc < 9.2))
413415
build-depends:
414416
record-dot-preprocessor,
415417
record-hasfield

0 commit comments

Comments
 (0)