Skip to content

Commit 6339d52

Browse files
authored
Merge branch 'master' into import-fix
2 parents 73b2bfd + 083f542 commit 6339d52

File tree

122 files changed

+1989
-243
lines changed

Some content is hidden

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

122 files changed

+1989
-243
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'status: needs triage, type: bug'
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Before opening an issue, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html). This explains some common issues and will also help you to find the information that the issue template asks for.
12+
13+
When filing an issue, please fill out as much of the information below as you can. This helps us to debug your issue, but is not required!
14+
-->
15+
16+
### Your environment
17+
18+
Which OS do you use:
19+
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
20+
Which lsp-client do you use:
21+
<!-- Neovim, emacs, VS Codium, etc... -->
22+
Describe your project (alternative: link to the project):
23+
<!-- stack.yaml, package.yaml, *.cabal files, cabal.project, hie.yaml -->
24+
25+
### Steps to reproduce
26+
<!-- Tell us how to reproduce this issue. -->
27+
28+
### Expected behaviour
29+
<!-- Tell us what should happen. -->
30+
31+
### Actual behaviour
32+
<!-- Tell us what happens instead. -->
33+
34+
### Include debug information
35+
Execute in the root of your project the command `haskell-language-server-wrapper --debug .` and paste the logs here:
36+
(if you are using the vscode extension check the executable location [here](https://github.com/haskell/vscode-haskell#downloaded-binaries))
37+
<details>
38+
<summary>
39+
Debug output:
40+
</summary>
41+
42+
```
43+
<paste your logs here>
44+
```
45+
</details>
46+
47+
Paste the logs from the lsp-client, you can check instructions about for VS Code [here](https://github.com/haskell/vscode-haskell#troubleshooting)
48+
49+
<details>
50+
<summary>
51+
LSP logs:
52+
</summary>
53+
54+
```
55+
<paste your logs here>
56+
```
57+
</details>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'status: needs triage, type: enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
13+
14+
**Describe the solution you'd like**
15+
16+
<!-- A clear and concise description of what you want to happen. -->
17+
18+
**Describe alternatives you've considered**
19+
20+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
21+
22+
**Additional context**
23+
24+
<!-- Add any other context or screenshots about the feature request here. -->

.github/workflows/hackage.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
"hls-call-hierarchy-plugin",
2929
"haskell-language-server"]
3030
# Uncomment 9.0.1 when ghcide is buildable
31-
ghc: [ # "9.0.1",
31+
ghc: [ "9.0.1",
3232
"8.10.7",
3333
"8.8.4",
3434
"8.6.5"]
@@ -133,11 +133,18 @@ jobs:
133133
# For floskell and stylish-haskell
134134
echo " floskell:base, floskell:ghc-prim, stylish-haskell:Cabal,stylish-haskell:ghc-lib-parser," >> cabal.project
135135
136-
- name: "Build all package components in isolation"
136+
- name: "Build main package components in isolation"
137137
if: steps.get-hackage-version.outputs.exists != 'true'
138138
run: |
139139
cd $(ls -d ./incoming/${{ matrix.package }}-*)
140-
cabal build --enable-tests --enable-benchmarks
140+
cabal build
141+
142+
- name: "Build package tests and benchmarks in isolation"
143+
if: steps.get-hackage-version.outputs.exists != 'true'
144+
run: |
145+
cd $(ls -d ./incoming/${{ matrix.package }}-*)
146+
# cabal-3.4.0.0 run out of backjumps with tests and benchs enabled
147+
cabal build --enable-tests --enable-benchmarks --max-backjumps 8000
141148
142149
- name: "Generate haddock for hackage"
143150
if: steps.get-hackage-version.outputs.exists != 'true'

.github/workflows/test.yml

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,26 @@ jobs:
139139
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
140140
src/**/*.hs exe/*.hs
141141
142+
# repeating builds to workaround segfaults in windows and ghc-8.8.4
142143
- name: Build
143-
# Retry it three times to workaround compiler segfaults in windows
144144
run: cabal build || cabal build || cabal build
145145

146+
- name: Set test options
147+
run: |
148+
echo "TEST_OPTS=-j1 --rerun-update --rerun-filter failures,exceptions,new" >> $GITHUB_ENV
149+
150+
- name: Cache test log bewteen attempts of the same run
151+
uses: actions/cache@v2
152+
env:
153+
cache-name: cache-test-log
154+
with:
155+
path: .tasty-rerun-log
156+
key: v1-${{ runner.os }}-${{ matrix.ghc }}-test-log-${{ github.sha }}
157+
146158
- if: needs.pre_job.outputs.should_skip_ghcide != 'true' && matrix.test
147159
name: Test ghcide
148160
# run the tests without parallelism to avoid running out of memory
149-
run: cabal test ghcide --test-options="-j1 --rerun-update" || cabal test ghcide --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="-j1 --rerun"
161+
run: cabal test ghcide --test-options="$TEST_OPTS" || cabal test ghcide --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test ghcide --test-options="$TEST_OPTS"
150162

151163
- if: matrix.test
152164
name: Test func-test suite
@@ -156,7 +168,7 @@ jobs:
156168
# run the tests without parallelism, otherwise tasty will attempt to run
157169
# all functional test cases simultaneously which causes way too many hls
158170
# instances to be spun up for the poor github actions runner to handle
159-
run: cabal test func-test --test-options="-j1 --rerun --rerun-update" || cabal test func-test --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="-j1 --rerun"
171+
run: cabal test func-test --test-options="$TEST_OPTS" || cabal test func-test --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test func-test --test-options="$TEST_OPTS"
160172

161173
- if: matrix.test
162174
name: Test wrapper-test suite
@@ -166,63 +178,68 @@ jobs:
166178
# run the tests without parallelism, otherwise tasty will attempt to run
167179
# all functional test cases simultaneously which causes way too many hls
168180
# instances to be spun up for the poor github actions runner to handle
169-
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"
181+
182+
run: cabal test wrapper-test --test-options="$TEST_OPTS" || cabal test wrapper-test --test-options="$TEST_OPTS" || cabal test wrapper-test --test-options="$TEST_OPTS"
170183

171184
- if: matrix.test && matrix.ghc != '9.0.1'
172185
name: Test hls-brittany-plugin
173-
run: cabal test hls-brittany-plugin --test-options="-j1 --rerun-update" || cabal test hls-brittany-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="-j1 --rerun"
186+
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"
174187

175188
- if: matrix.test && matrix.ghc != '9.0.1'
176189
name: Test hls-class-plugin
177-
run: cabal test hls-class-plugin --test-options="-j1 --rerun-update" || cabal test hls-class-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="-j1 --rerun"
190+
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"
178191

179192
- if: matrix.test
180193
name: Test hls-eval-plugin
181-
run: cabal test hls-eval-plugin --test-options="-j1 --rerun-update" || cabal test hls-eval-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-eval-plugin --test-options="-j1 --rerun"
194+
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"
182195

183196
- if: matrix.test
184197
name: Test hls-haddock-comments-plugin
185-
run: cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun-update" || cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-haddock-comments-plugin --test-options="-j1 --rerun"
198+
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"
186199

187200
- if: matrix.test
188201
name: Test hls-splice-plugin
189-
run: cabal test hls-splice-plugin --test-options="-j1 --rerun-update" || cabal test hls-splice-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-splice-plugin --test-options="-j1 --rerun"
202+
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"
190203

191204
- if: matrix.test && matrix.ghc != '9.0.1'
192205
name: Test hls-stylish-haskell-plugin
193-
run: cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun-update" || cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-stylish-haskell-plugin --test-options="-j1 --rerun"
206+
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"
194207

195208
- if: matrix.test
196209
name: Test hls-ormolu-plugin
197-
run: cabal test hls-ormolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-ormolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-ormolu-plugin --test-options="-j1 --rerun"
210+
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"
198211

199212
- if: matrix.test
200213
name: Test hls-fourmolu-plugin
201-
run: cabal test hls-fourmolu-plugin --test-options="-j1 --rerun-update" || cabal test hls-fourmolu-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-fourmolu-plugin --test-options="-j1 --rerun"
214+
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"
202215

203-
- if: matrix.test && matrix.ghc != '9.0.1'
216+
- if: matrix.test && matrix.ghc != '9.0.1' && !(matrix.os == 'ubuntu-latest' && matrix.ghc == '8.6.5')
204217
name: Test hls-tactics-plugin test suite
205-
run: cabal test hls-tactics-plugin --test-options="-j1 --rerun-update" || cabal test hls-tactics-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-tactics-plugin --test-options="-j1 --rerun"
218+
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"
206219

207220
- if: matrix.test
208221
name: Test hls-refine-imports-plugin test suite
209-
run: cabal test hls-refine-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-refine-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-refine-imports-plugin --test-options="-j1 --rerun"
222+
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"
210223

211224
- if: matrix.test
212225
name: Test hls-explicit-imports-plugin test suite
213-
run: cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun-update" || cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="-j1 --rerun"
226+
run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"
214227

215228
- if: matrix.test
216229
name: Test hls-call-hierarchy-plugin test suite
217-
run: cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun-update" || cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-call-hierarchy-plugin --test-options="-j1 --rerun"
230+
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"
218231

219232
- if: matrix.test
220233
name: Test hls-rename-plugin test suite
221-
run: cabal test hls-rename-plugin --test-options="-j1 --rerun-update" || cabal test hls-rename-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-rename-plugin --test-options="-j1 --rerun"
234+
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"
222235

223236
- if: matrix.test
224237
name: Test hls-hlint-plugin test suite
225-
run: cabal test hls-hlint-plugin --test-options="-j1 --rerun-update" || cabal test hls-hlint-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-hlint-plugin --test-options="-j1 --rerun"
238+
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"
239+
240+
- if: matrix.test
241+
name: Test hls-qualify-imported-names-plugin test suite
242+
run: cabal test hls-qualify-imported-names-plugin --test-options="-j1 --rerun-update" || cabal test hls-qualify-imported-names-plugin --test-options="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-qualify-imported-names-plugin --test-options="-j1 --rerun"
226243

227244
test_post_job:
228245
if: always()

0 commit comments

Comments
 (0)