Skip to content

Commit d6a8666

Browse files
committed
Merge branch 'master' of github.com:sloorush/haskell-language-server into folding-ranges
2 parents baf419e + 3fb4082 commit d6a8666

File tree

354 files changed

+12076
-6358
lines changed

Some content is hidden

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

354 files changed

+12076
-6358
lines changed

.circleci/config.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,16 @@ version: 2
7777
jobs:
7878
stackage-lts16:
7979
environment:
80-
# https://github.com/digital-asset/ghc-lib/issues/352
81-
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
8280
- STACK_FILE: "stack-lts16.yaml"
8381
<<: *defaults
8482

8583
stackage-lts19:
8684
environment:
87-
# https://github.com/digital-asset/ghc-lib/issues/352
88-
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
8985
- STACK_FILE: "stack-lts19.yaml"
9086
<<: *defaults
9187

9288
stackage-nightly:
9389
environment:
94-
# https://github.com/digital-asset/ghc-lib/issues/352
95-
- CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
9690
- STACK_FILE: "stack.yaml"
9791
<<: *defaults
9892

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve
3+
about: I've spotted something specific thats' going wrong
44
title: ''
55
labels: 'status: needs triage, type: bug'
66
assignees: ''
77

88
---
99

1010
<!--
11-
Before opening an issue, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
11+
Before opening a bug, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
1212
This explains some common issues and will also help you to find the information that the issue template asks for.
13-
14-
When filing an issue, please fill out as much of the information below as you can.
15-
This helps us to debug your issue, but is not required!
1613
-->
1714

1815
### Your environment
1916

20-
Which OS do you use:
17+
<!--
18+
Everything in this section is optional, but it does help us to debug your issue!
19+
-->
20+
21+
Which OS do you use?
2122
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
22-
Which LSP client (editor/plugin) do you use:
23+
Which version of GHC do you use and how did you install it?
24+
<!-- 9.0.2 from stack/ghcup, etc. -->
25+
How is your project built (alternative: link to the project)?
26+
27+
Which LSP client (editor/plugin) do you use?
2328
<!-- Neovim+LanguageClient-neovim, emacs+lsp-mode, VS Codium+vscode-haskell, etc... -->
24-
Describe your project (alternative: link to the project):
25-
<!-- stack.yaml, package.yaml, *.cabal files, cabal.project, hie.yaml -->
29+
Which version of HLS do you use and how did you install it?
30+
<!-- 1.7.0.1 from ghcup, etc. -->
31+
Have you configured HLS in any way (especially: a `hie.yaml` file)?
2632

2733
### Steps to reproduce
34+
2835
<!-- Tell us how to reproduce this issue. -->
2936

3037
### Expected behaviour
38+
3139
<!-- Tell us what should happen. -->
3240

3341
### Actual behaviour
42+
3443
<!-- Tell us what happens instead. -->
3544

36-
### Include debug information
45+
### Debug information
3746

3847
<!-- Include any useful debug information, such as relevant log snippets. -->
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
2+
name: Enhancement request
3+
about: I have an idea for how to make things better
44
title: ''
55
labels: 'status: needs triage, type: enhancement'
66
assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
10+
## Is your enhancement request related to a problem? Please describe.
1111

1212
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
1313

14-
**Describe the solution you'd like**
14+
## Describe the solution you'd like
1515

1616
<!-- A clear and concise description of what you want to happen. -->
1717

18-
**Describe alternatives you've considered**
18+
## Describe alternatives you've considered
1919

2020
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
2121

22-
**Additional context**
22+
## Additional context
2323

2424
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/support.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Support request
3+
about: Help, something isn't working and I'm stuck!
4+
title: ''
5+
labels: 'status: needs triage, type: support'
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
Before asking for support, please take a look at the [troubleshooting guide](https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html).
12+
This explains some common issues and will also help you to find the information that the issue template asks for.
13+
-->
14+
15+
## Your environment
16+
17+
<!--
18+
Everything in this section is optional, but it does help us to debug your issue!
19+
-->
20+
21+
Which OS do you use?
22+
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
23+
Which version of GHC do you use and how did you install it?
24+
<!-- 9.0.2 from stack/ghcup, etc. -->
25+
How is your project built (alternative: link to the project)?
26+
27+
Which LSP client (editor/plugin) do you use?
28+
<!-- Neovim+LanguageClient-neovim, emacs+lsp-mode, VS Codium+vscode-haskell, etc... -->
29+
Which version of HLS do you use and how did you install it?
30+
<!-- 1.7.0.1 from ghcup, etc. -->
31+
Have you configured HLS in any way (especially: a `hie.yaml` file)?
32+
33+
## What's wrong?
34+
35+
<!-- What's not working? What have you tried? -->
36+
37+
### Debug information
38+
39+
<!-- Include any useful debug information, such as relevant log snippets. -->

.github/actions/setup-build/action.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
cabal:
88
description: "Cabal version"
99
required: false
10-
default: "3.6"
10+
default: "3.8.1.0"
1111
os:
1212
description: "Operating system: Linux, Windows or macOS"
1313
required: true
@@ -42,27 +42,6 @@ runs:
4242
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
4343
shell: bash
4444

45-
# This copy an alternative cabal-ghc${GHCVER}.project (for example cabal-ghc92.project)
46-
# as main cabal-project, for not fully supported ghc versions
47-
# Needs to be before the caching step so that the cache can detect changes to the modified cabal.project file
48-
- name: Use possible modified `cabal.project`
49-
env:
50-
GHCVER: ${{ inputs.ghc }}
51-
run: |
52-
# File has some protections preventing regular `rm`.
53-
# (most probably sticky bit is set on $HOME)
54-
# `&&` insures `rm -f` return is positive.
55-
# Many platforms also have `alias cp='cp -i'`.
56-
GHCVER2=${GHCVER//./}
57-
ALT_PROJECT_FILE_MINOR=cabal-ghc${GHCVER2}.project
58-
ALT_PROJECT_FILE_MAJOR=cabal-ghc${GHCVER2:0:2}.project
59-
if [[ -f "$ALT_PROJECT_FILE_MINOR" ]]; then
60-
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MINOR" cabal.project
61-
elif [[ -f "$ALT_PROJECT_FILE_MAJOR" ]]; then
62-
rm -f -v cabal.project && cp -v "$ALT_PROJECT_FILE_MAJOR" cabal.project
63-
fi
64-
shell: bash
65-
6645
- if: inputs.os == 'Windows' && inputs.ghc == '8.8.4'
6746
name: (Windows,GHC 8.8) Modify `cabal.project` to workaround segfaults
6847
run: |

.github/workflows/bench.yml

Lines changed: 22 additions & 21 deletions
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']
49+
ghc: ['8.10.7', '9.2.4']
5050
os: [ubuntu-latest]
5151

5252
# This code is fitted to the strategy: assumes Linux is used ... etc,
@@ -61,16 +61,17 @@ jobs:
6161
with:
6262
ghc: ${{ matrix.ghc }}
6363
os: ${{ runner.os }}
64+
shorten-hls: "false"
6465

6566
# max-backjumps is increased as a temporary solution
6667
# for dependency resolution failure
6768
- run: cabal configure --enable-benchmarks --max-backjumps 12000
6869

6970
- name: Build
70-
run: cabal build ghcide:benchHist
71+
run: cabal build haskell-language-server:benchmark
7172

7273
- name: Bench init
73-
run: cabal bench ghcide:benchHist -j --benchmark-options="all-binaries"
74+
run: cabal bench -j --benchmark-options="all-binaries"
7475

7576
# tar is required to preserve file permissions
7677
# compression speeds up upload/download nicely
@@ -85,14 +86,14 @@ jobs:
8586
- name: Upload workspace
8687
uses: actions/upload-artifact@v3
8788
with:
88-
name: workspace
89+
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
8990
retention-days: 1
9091
path: workspace.tar.gz
9192

9293
- name: Upload .cabal
9394
uses: actions/upload-artifact@v3
9495
with:
95-
name: cabal-home
96+
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
9697
retention-days: 1
9798
path: ~/.cabal/cabal.tar.gz
9899

@@ -103,7 +104,7 @@ jobs:
103104
strategy:
104105
fail-fast: false
105106
matrix:
106-
ghc: ['8.10.7']
107+
ghc: ['8.10.7', '9.2.4']
107108
os: [ubuntu-latest]
108109
cabal: ['3.6']
109110
example: ['cabal', 'lsp-types']
@@ -118,13 +119,13 @@ jobs:
118119
- name: Download cabal home
119120
uses: actions/download-artifact@v3
120121
with:
121-
name: cabal-home
122+
name: cabal-home-${{ matrix.ghc }}-${{ matrix.os }}
122123
path: .
123124

124125
- name: Download workspace
125126
uses: actions/download-artifact@v3
126127
with:
127-
name: workspace
128+
name: workspace-${{ matrix.ghc }}-${{ matrix.os }}
128129
path: .
129130

130131
- name: untar
@@ -134,30 +135,30 @@ jobs:
134135
tar xzf cabal.tar.gz --directory ~/.cabal
135136
136137
- name: Bench
137-
run: cabal bench ghcide:benchHist -j --benchmark-options="${{ matrix.example }}"
138+
run: cabal bench -j --benchmark-options="${{ matrix.example }}"
138139

139140
- name: Display results
140141
run: |
141-
column -s, -t < ghcide/bench-results/unprofiled/${{ matrix.example }}/results.csv | tee ghcide/bench-results/unprofiled/${{ matrix.example }}/results.txt
142+
column -s, -t < bench-results/unprofiled/${{ matrix.example }}/results.csv | tee bench-results/unprofiled/${{ matrix.example }}/results.txt
143+
144+
- name: tar benchmarking artifacts
145+
run: find bench-results -name "*.csv" -or -name "*.svg" -or -name "*.html" | xargs tar -czf benchmark-artifacts.tar.gz
142146

143147
- name: Archive benchmarking artifacts
144148
uses: actions/upload-artifact@v3
145149
with:
146-
name: bench-results-${{ runner.os }}-${{ matrix.ghc }}
147-
path: |
148-
ghcide/bench-results/results.*
149-
ghcide/bench-results/**/*.csv
150-
ghcide/bench-results/**/*.svg
151-
ghcide/bench-results/**/*.eventlog.html
150+
name: bench-results-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
151+
path: benchmark-artifacts.tar.gz
152+
153+
- name: tar benchmarking logs
154+
# We dont' store the eventlogs because the CI workers risk running out of disk space
155+
run: find bench-results -name "*.log" -or -name "*.hp" | xargs tar -czf benchmark-logs.tar.gz
152156

153157
- name: Archive benchmark logs
154158
uses: actions/upload-artifact@v3
155159
with:
156-
name: bench-logs-${{ runner.os }}-${{ matrix.ghc }}
157-
path: |
158-
ghcide/bench-results/**/*.log
159-
ghcide/bench-results/**/*.eventlog
160-
ghcide/bench-results/**/*.hp
160+
name: bench-logs-${{ matrix.example }}-${{ runner.os }}-${{ matrix.ghc }}
161+
path: benchmark-logs.tar.gz
161162

162163
bench_post_job:
163164
if: always()

.github/workflows/caching.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ jobs:
8080
strategy:
8181
fail-fast: false
8282
matrix:
83-
ghc: [ "9.2.3"
84-
, "9.2.2"
83+
ghc: [ "9.2.4"
84+
, "9.2.3"
8585
, "9.0.2"
8686
, "8.10.7"
8787
, "8.8.4"
@@ -115,9 +115,6 @@ jobs:
115115
run: |
116116
# repeating builds to workaround segfaults in windows and ghc-8.8.4
117117
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild
118-
env:
119-
# needed for GHC 9.2.2 https://github.com/digital-asset/ghc-lib/issues/352
120-
CPATH: "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi:$CPATH"
121118
122119
# We build ghcide with benchs and test enabled to include its dependencies in the cache
123120
# (including shake-bench)

.github/workflows/flags.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
strategy:
4545
fail-fast: true
4646
matrix:
47-
ghc: [ "9.2.3"
47+
ghc: [ "9.2.4"
4848
, "9.0.2"
4949
, "8.10.7"
5050
, "8.8.4"
@@ -68,7 +68,7 @@ jobs:
6868
run: cabal v2-build ghcide --flags="ghc-patched-unboxed-bytecode test-exe executable bench-exe ekg"
6969

7070
# we have to clean up warnings for 9.0 and 9.2 before enable -WAll
71-
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.3'
71+
- if: matrix.ghc != '9.0.2' && matrix.ghc != '9.2.4'
7272
name: Build with pedantic (-WError)
7373
run: cabal v2-build --flags="pedantic"
7474

.github/workflows/hackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
"hls-brittany-plugin", "hls-floskell-plugin", "hls-fourmolu-plugin",
3232
"hls-ormolu-plugin", "hls-stylish-haskell-plugin",
3333
"hls-class-plugin", "hls-eval-plugin", "hls-explicit-imports-plugin",
34-
"hls-haddock-comments-plugin", "hls-hlint-plugin",
34+
"hls-haddock-comments-plugin", "hls-hlint-plugin", "hls-stan-plugin",
3535
"hls-module-name-plugin", "hls-pragmas-plugin",
3636
"hls-refine-imports-plugin", "hls-rename-plugin", "hls-retrie-plugin",
3737
"hls-splice-plugin", "hls-tactics-plugin",

.github/workflows/pre-commit.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
pre-commit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- uses: ./.github/actions/setup-build
15+
with:
16+
os: ${{ runner.os }}
17+
shorten-hls: false
18+
19+
- name: "Install stylish-haskell"
20+
run: |
21+
cabal install stylish-haskell
22+
echo "${HOME}/.cabal/bin" >> $GITHUB_PATH
23+
24+
- name: "Check stylish-haskell is available"
25+
run: |
26+
echo $(which stylish-haskell)
27+
28+
- name: Compiled deps cache
29+
id: stylish-haskell-compiled-cache
30+
uses: actions/cache@v3
31+
env:
32+
cache-name: stylish-haskell-compiled-cache
33+
with:
34+
path: ${{ env.CABAL_PKGS_DIR }}
35+
key: ${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
36+
restore-keys: |
37+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-${{ env.INDEX_STATE }}-
38+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-
39+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-
40+
41+
- uses: actions/setup-python@v4
42+
- uses: pre-commit/action@v3.0.0

0 commit comments

Comments
 (0)