Skip to content

Commit d1acd85

Browse files
committed
Merge branch 'master' into wingman-at-lightspeed
2 parents c57ccf0 + 78381b8 commit d1acd85

File tree

267 files changed

+4934
-2016
lines changed

Some content is hidden

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

267 files changed

+4934
-2016
lines changed

.circleci/config.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ defaults: &defaults
3333
- run:
3434
name: Build (we need the exe for tests)
3535
# need j1, else ghc-lib-parser triggers OOM
36-
command: stack -j 1 --stack-yaml=${STACK_FILE} install
36+
command: stack -j 1 --stack-yaml=${STACK_FILE} install --no-terminal
3737
no_output_timeout: 30m
3838

3939
- run:
4040
name: Build Testsuite without running it
41-
command: stack -j 1 --stack-yaml=${STACK_FILE} build --test --no-run-tests
41+
command: stack -j 1 --stack-yaml=${STACK_FILE} build --test --no-run-tests --no-terminal
4242
no_output_timeout: 30m
4343

4444
- store_artifacts:
@@ -54,7 +54,7 @@ defaults: &defaults
5454

5555
- run:
5656
name: Build including tests
57-
command: stack --stack-yaml=${STACK_FILE} test --no-run-tests
57+
command: stack --stack-yaml=${STACK_FILE} test --no-run-tests --no-terminal
5858
no_output_timeout: 120m
5959

6060
- save_cache:
@@ -73,11 +73,6 @@ jobs:
7373
- STACK_FILE: "stack-8.6.5.yaml"
7474
<<: *defaults
7575

76-
ghc-8.8.2:
77-
environment:
78-
- STACK_FILE: "stack-8.8.2.yaml"
79-
<<: *defaults
80-
8176
ghc-8.8.3:
8277
environment:
8378
- STACK_FILE: "stack-8.8.3.yaml"
@@ -103,6 +98,16 @@ jobs:
10398
- STACK_FILE: "stack-8.10.4.yaml"
10499
<<: *defaults
105100

101+
ghc-8.10.5:
102+
environment:
103+
- STACK_FILE: "stack-8.10.5.yaml"
104+
<<: *defaults
105+
106+
ghc-9.0.1:
107+
environment:
108+
- STACK_FILE: "stack-9.0.1.yaml"
109+
<<: *defaults
110+
106111
ghc-default:
107112
environment:
108113
- STACK_FILE: "stack.yaml"
@@ -115,10 +120,11 @@ workflows:
115120
jobs:
116121
- ghc-8.6.4
117122
- ghc-8.6.5
118-
- ghc-8.8.2
119123
- ghc-8.8.3
120124
- ghc-8.8.4
121125
- ghc-8.10.2
122126
- ghc-8.10.3
123127
- ghc-8.10.4
128+
- ghc-8.10.5
129+
- ghc-9.0.1
124130
- ghc-default

.github/workflows/bench.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
- if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
136136
name: untar
137137
run: |
138+
mkdir -p ~/.cabal
138139
tar xzf workspace.tar.gz
139140
tar xzf cabal.tar.gz --directory ~/.cabal
140141

.github/workflows/build.yml

Lines changed: 54 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
ghc: ['8.10.4', '8.10.3', '8.10.2', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4']
19+
ghc: ['9.0.1', '8.10.5', '8.10.4', '8.10.3', '8.10.2', '8.8.4', '8.8.3', '8.6.5', '8.6.4']
2020
os: [ubuntu-18.04, macOS-latest, windows-latest]
2121
exclude:
2222
- os: windows-latest
@@ -25,8 +25,6 @@ jobs:
2525
ghc: '8.8.4' # also fails due to segfault :(
2626
- os: windows-latest
2727
ghc: '8.8.3' # fails due to segfault
28-
- os: windows-latest
29-
ghc: '8.8.2' # fails due to error with Cabal
3028
include:
3129
- os: windows-latest
3230
ghc: '8.10.2.2' # only available for windows and choco
@@ -38,13 +36,17 @@ jobs:
3836
- uses: haskell/actions/setup@v1
3937
with:
4038
ghc-version: ${{ matrix.ghc }}
41-
cabal-version: '3.2'
39+
cabal-version: '3.4'
40+
41+
- if: ${{ matrix.ghc == '9.0.1' }}
42+
name: Use modified cabal.project for ghc9
43+
run: cp cabal-ghc901.project cabal.project
4244

4345
- name: Shorten binary names
4446
run: |
4547
sed -i.bak -e 's/haskell-language-server/hls/g' \
4648
-e 's/haskell_language_server/hls/g' \
47-
haskell-language-server.cabal
49+
haskell-language-server.cabal cabal.project
4850
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
4951
src/**/*.hs exe/*.hs
5052
@@ -54,6 +56,7 @@ jobs:
5456
GHC_VER: ${{ matrix.ghc }}
5557
run: |
5658
echo "EXE_EXT=.exe" >> $GITHUB_ENV
59+
# We normalize windows+choco ghc version 8.10.2.2
5760
GHC_VER=$(echo $GHC_VER | sed 's/8.10.2.2/8.10.2/g')
5861
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV
5962
@@ -72,6 +75,12 @@ jobs:
7275
run: |
7376
echo "GHC_VERSION=$GHC_VER" >> $GITHUB_ENV
7477
78+
- name: Workaround for GHC 8.10.5 on macOS
79+
if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5'
80+
run: |
81+
echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)"
82+
sudo rm -rf /Library/Developer/CommandLineTools
83+
7584
- name: Build Server
7685
# Try building it twice in case of flakey builds on Windows
7786
run: |
@@ -81,7 +90,6 @@ jobs:
8190
- name: Compress Server Binary
8291
id: compress_server_binary
8392
run: |
84-
# We normalize windows+choco ghc version 8.10.2.2
8593
HLS_BUILD=$(find dist-newstyle \( -name 'hls' -o -name 'hls.exe' \) -type f)
8694
HLS=haskell-language-server-${{env.GHC_VERSION}}
8795
mv $HLS_BUILD $HLS${{env.EXE_EXT}}
@@ -159,18 +167,23 @@ jobs:
159167
runs-on: ubuntu-18.04
160168
strategy:
161169
matrix:
162-
os: [Linux, macOS]
170+
os: [Linux, macOS, Windows]
163171
steps:
164172
- uses: actions/download-artifact@v2
165173

166174
- run: |
167175
# move the binaries for the specific platform into bin/
168176
mkdir bin
169-
mv haskell-language-server-${{ matrix.os }}-*.gz/haskell-language-server-*.gz bin
170-
mv haskell-language-server-wrapper-${{ matrix.os }}.gz/haskell-language-server-wrapper.gz bin
177+
mv haskell-language-server-${{ matrix.os }}-*/* bin
178+
mv haskell-language-server-wrapper-${{ matrix.os }}.*/* bin
171179
# decompress them
172-
gzip -d bin/*.gz
173180
cd bin
181+
if [[ "${{ matrix.os }}" == "Windows" ]]; then
182+
7z x "*.zip"
183+
rm *.zip
184+
else
185+
gzip -d *.gz
186+
fi
174187
tar -czpf haskell-language-server.tar.gz *
175188
176189
- uses: actions/[email protected]
@@ -181,3 +194,34 @@ jobs:
181194
asset_path: bin/haskell-language-server.tar.gz
182195
asset_name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
183196
asset_content_type: application/gzip
197+
198+
- uses: actions/upload-artifact@v2
199+
with:
200+
name: haskell-language-server-${{ matrix.os }}-${{ github.event.release.tag_name }}.tar.gz
201+
path: bin/haskell-language-server.tar.gz
202+
203+
sha256sum:
204+
needs: tar
205+
runs-on: ubuntu-18.04
206+
steps:
207+
- uses: actions/download-artifact@v2
208+
209+
- run: |
210+
# generate sha256 sums for all current artifacts
211+
sha256sum --tag haskell-language-server*/* >> SHA256SUMS
212+
# we clean up tags to match the release file names
213+
sed -i 's/\/.*)/)/g' SHA256SUMS
214+
215+
- uses: actions/[email protected]
216+
env:
217+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218+
with:
219+
upload_url: ${{ github.event.release.upload_url }}
220+
asset_path: SHA256SUMS
221+
asset_name: SHA256SUMS
222+
asset_content_type: plain/text
223+
224+
- uses: actions/upload-artifact@v2
225+
with:
226+
name: SHA256SUMS
227+
path: SHA256SUMS

.github/workflows/nix.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- if: ${{ needs.pre_job.outputs.should_skip_develop != 'true' }}
4545
uses: cachix/install-nix-action@v13
4646
with:
47-
install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install
47+
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
4848
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
4949
extra_nix_config: |
5050
experimental-features = nix-command flakes
@@ -81,7 +81,7 @@ jobs:
8181
submodules: true
8282
- uses: cachix/install-nix-action@v13
8383
with:
84-
install_url: https://nixos-nix-install-tests.cachix.org/serve/lb41az54kzk6j12p81br4bczary7m145/install
84+
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
8585
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
8686
extra_nix_config: |
8787
experimental-features = nix-command flakes
@@ -92,11 +92,15 @@ jobs:
9292
authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
9393
- name: Build development shell
9494
run: nix develop --profile dev
95+
- name: Build development shell (GHC 9.0.1)
96+
run: nix develop .#haskell-language-server-901-dev --profile dev
9597
- name: Push development shell
9698
if: ${{ env.HAS_TOKEN == 'true' }}
9799
run: cachix push haskell-language-server dev
98100
- name: Build binaries
99101
run: nix build
102+
- name: Build binaries (GHC 9.0.1)
103+
run: nix build .#haskell-language-server-901
100104
- name: Push binaries
101105
if: ${{ env.HAS_TOKEN == 'true' }}
102106
run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server

.github/workflows/test.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,38 @@ jobs:
3333
strategy:
3434
fail-fast: true
3535
matrix:
36-
ghc: ["8.10.4", "8.10.3", "8.10.2", "8.8.4", "8.8.3", "8.8.2", "8.6.5", "8.6.4"]
36+
ghc: ["9.0.1", "8.10.5", "8.10.4", "8.10.3", "8.10.2", "8.8.4", "8.8.3", "8.6.5", "8.6.4"]
3737
os: [ubuntu-latest, macOS-latest]
3838
include:
3939
# only test supported ghc major versions
4040
- os: ubuntu-latest
41-
ghc: '8.10.4'
41+
ghc: '9.0.1'
4242
test: true
43-
- os: windows-latest
44-
ghc: '8.10.4'
43+
- os: ubuntu-latest
44+
ghc: '8.10.5'
4545
test: true
4646
- os: ubuntu-latest
4747
ghc: '8.8.4'
4848
test: true
4949
- os: ubuntu-latest
5050
ghc: '8.6.5'
5151
test: true
52+
- os: windows-latest
53+
ghc: '9.0.1'
54+
test: true
55+
- os: windows-latest
56+
ghc: '8.10.5'
57+
test: true
5258
- os: windows-latest
5359
ghc: '8.6.5'
5460
test: true
5561
# only build rest of supported ghc versions for windows
5662
- os: windows-latest
57-
ghc: '8.10.2.2'
63+
ghc: '8.10.4'
5864
- os: windows-latest
5965
ghc: '8.10.3'
66+
- os: windows-latest
67+
ghc: '8.10.2.2'
6068
# This build get stuck frequently
6169
# - os: windows-latest
6270
# ghc: '8.6.4'
@@ -70,7 +78,7 @@ jobs:
7078
uses: haskell/actions/setup@v1
7179
with:
7280
ghc-version: ${{ matrix.ghc }}
73-
cabal-version: "3.2"
81+
cabal-version: "3.4"
7482

7583
- if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
7684
run: ./fmt.sh
@@ -88,6 +96,17 @@ jobs:
8896
echo "CABAL_STORE_DIR=~/.cabal/store" >> $GITHUB_ENV
8997
echo "CABAL_PKGS_DIR=~/.cabal/packages" >> $GITHUB_ENV
9098
99+
- name: Tentative Workaround for GHC 8.10.5 on macOS
100+
if: matrix.os == 'macOS-latest' && matrix.ghc == '8.10.5'
101+
run: |
102+
echo "# uninstalling CommandLineTools (see https://github.com/haskell/haskell-language-server/issues/1913#issuecomment-861667786)"
103+
sudo rm -rf /Library/Developer/CommandLineTools
104+
105+
# Needs to be before Cache Cabal so the cache can detect changes to the modified cabal.project file
106+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.ghc == '9.0.1' }}
107+
name: Use modified cabal.project for ghc9
108+
run: cp cabal-ghc901.project cabal.project
109+
91110
- if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
92111
name: Cache Cabal
93112
uses: actions/cache@v2
@@ -112,7 +131,7 @@ jobs:
112131
run: |
113132
sed -i.bak -e 's/haskell-language-server/hls/g' \
114133
-e 's/haskell_language_server/hls/g' \
115-
haskell-language-server.cabal
134+
haskell-language-server.cabal cabal.project
116135
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
117136
src/**/*.hs exe/*.hs
118137
@@ -126,7 +145,7 @@ jobs:
126145
# run the tests without parallelism to avoid running out of memory
127146
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"
128147

129-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
148+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && !(matrix.os == 'windows-latest' && matrix.ghc == '9.0.1')}}
130149
name: Test func-test suite
131150
env:
132151
HLS_TEST_EXE: hls
@@ -146,38 +165,38 @@ jobs:
146165
# instances to be spun up for the poor github actions runner to handle
147166
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"
148167

149-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
168+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
150169
name: Test hls-brittany-plugin
151170
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"
152171

153-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
172+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
154173
name: Test hls-class-plugin
155174
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"
156175

157-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
176+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc }}
158177
name: Test hls-eval-plugin
159178
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"
160179

161180
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
162181
name: Test hls-haddock-comments-plugin
163182
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"
164183

165-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
184+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
166185
name: Test hls-splice-plugin
167186
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"
168187

169-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
188+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
170189
name: Test hls-stylish-haskell-plugin
171190
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"
172191

173-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
192+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
174193
name: Test hls-fourmolu-plugin
175194
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"
176195

177-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
196+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
178197
name: Test hls-tactics-plugin test suite
179198
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"
180199

181-
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test }}
200+
- if: ${{ needs.pre_job.outputs.should_skip != 'true' && matrix.test && matrix.ghc != '9.0.1' }}
182201
name: Test hls-refine-imports-plugin test suite
183202
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"

0 commit comments

Comments
 (0)