Skip to content

Commit 8050b14

Browse files
committed
Merge branch 'master' into tactic-exclude-coercions
2 parents 229397e + d79feb5 commit 8050b14

File tree

101 files changed

+3278
-845
lines changed

Some content is hidden

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

101 files changed

+3278
-845
lines changed

.circleci/config.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,24 @@ defaults: &defaults
6464
no_output_timeout: 120m
6565

6666
- run:
67-
name: Test haskell-language-server
67+
name: Test haskell-language-server func-test suite
6868
# Tasty by default will run all the tests in parallel. Which should
6969
# work ok, but given that these CircleCI runners aren't the beefiest
7070
# machine can cause some flakiness. So pass -j1 to Tasty (NOT Stack) to
7171
# tell it to go slow and steady.
72-
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server --dump-logs --test-arguments="-j1"
72+
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun-update" || stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true stack --stack-yaml=${STACK_FILE} test haskell-language-server:func-test --dump-logs --test-arguments="-j1 --rerun"
7373
no_output_timeout: 120m
7474

75+
- run:
76+
name: Test haskell-language-server wrapper-test suite
77+
command: stack --stack-yaml=${STACK_FILE} test haskell-language-server:wrapper-test --dump-logs --test-arguments="-j1" || stack --stack-yaml=${STACK_FILE} test haskell-language-server:wrapper-test --dump-logs --test-arguments="-j1"
78+
no_output_timeout: 30m
79+
80+
- run:
81+
name: Test hls-tactics-plugin
82+
command: stack --stack-yaml=${STACK_FILE} test hls-tactics-plugin:test:tests --dump-logs --test-arguments="-j1"
83+
no_output_timeout: 30m
84+
7585
- store_test_results:
7686
path: test-results
7787

@@ -119,10 +129,10 @@ jobs:
119129
- STACK_FILE: "stack-8.10.2.yaml"
120130
<<: *defaults
121131

122-
# ghc-nightly:
123-
# environment:
124-
# - STACK_FILE: "stack.yaml"
125-
# <<: *defaults
132+
ghc-nightly:
133+
environment:
134+
- STACK_FILE: "stack.yaml"
135+
<<: *defaults
126136

127137
cabal:
128138
working_directory: ~/build
@@ -180,7 +190,7 @@ jobs:
180190
- cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
181191
- run:
182192
name: Build
183-
command: nix-shell -j4 --run "cabal new-update && cabal new-build -j1 --enable-tests"
193+
command: nix-shell -j4 --run "cabal new-update && (cabal new-build -j1 --enable-tests || cabal new-build -j1 --enable-tests) "
184194
no_output_timeout: 30m
185195
- save_cache:
186196
key: cabal-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}

.github/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1+
<!--
12
If you encounter a bug or you have a support question, please try to fill out some of the information below.
2-
However, if you think your issue does not need any of it, you may omit it.
3-
Generally speaking, the information below is meant for helping debugging issues
4-
but they are no prerequisite for opening issues.
5-
6-
### Subject of the issue
7-
Describe your issue here.
3+
Generally speaking, the information below is meant to help debugging issues but is no prerequisite for opening an issue.
4+
-->
85

96
### Your environment
10-
* Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`
11-
* This command is available since version `>= 0.4.0.0`
12-
* Which lsp-client do you use
13-
* Neovim, emacs, VS Codium, etc...
14-
* Describe your project (alternative: link to the project)
15-
* Include `stack.yaml`
16-
* Include `package.yaml`
17-
* Include `*.cabal` files
18-
* Include `cabal.project`
19-
* Contents of `hie.yaml`
7+
Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`:
8+
<!-- This command is available since version `>= 0.4.0.0` -->
9+
```sh
10+
11+
```
12+
Which lsp-client do you use:
13+
<!-- Neovim, emacs, VS Codium, etc... -->
14+
Describe your project (alternative: link to the project):
15+
<!-- stack.yaml, package.yaml, *.cabal files, cabal.project -->
16+
Contents of `hie.yaml`:
17+
```yaml
18+
19+
```
2020

2121
### Steps to reproduce
22-
Tell us how to reproduce this issue.
22+
<!-- Tell us how to reproduce this issue. -->
2323

2424
### Expected behaviour
25-
Tell us what should happen.
25+
<!-- Tell us what should happen. -->
2626

2727
### Actual behaviour
28-
Tell us what happens instead.
28+
<!-- Tell us what happens instead. -->
2929

3030
### Include debug information
3131
Execute in the root of your project the command `haskell-language-server --debug .` and paste the logs here:

.github/workflows/build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ defaults:
77
on:
88
release:
99
types: [created]
10+
1011
jobs:
1112

1213
build:
@@ -46,13 +47,11 @@ jobs:
4647
4748
- name: Set some window specific things
4849
if: matrix.os == 'windows-latest'
49-
run: |
50-
echo '::set-env name=EXE_EXT::.exe'
50+
run: echo "EXE_EXT=.exe" >> $GITHUB_ENV
5151

5252
- name: Set some linux specific things
5353
if: matrix.os == 'ubuntu-latest'
54-
run: |
55-
echo '::set-env name=LINUX_CABAL_ARGS::--enable-executable-static --ghc-options=-split-sections'
54+
run: echo "LINUX_CABAL_ARGS=--enable-executable-static --ghc-options=-split-sections" >> $GITHUB_ENV
5655

5756
- name: Build Server
5857
# Try building it twice in case of flakey builds on Windows
@@ -154,7 +153,7 @@ jobs:
154153
# decompress them
155154
gzip -d bin/*.gz
156155
cd bin
157-
tar -czf haskell-language-server.tar.gz *
156+
tar -czpf haskell-language-server.tar.gz *
158157
159158
- uses: actions/[email protected]
160159
env:

.github/workflows/test.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Testing
2+
3+
on: [push, pull_request]
4+
jobs:
5+
test:
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
ghc: ['8.10.2', '8.10.1', '8.8.4', '8.8.3', '8.8.2', '8.6.5', '8.6.4']
11+
os: [ubuntu-latest, macOS-latest, windows-latest]
12+
exclude:
13+
- os: windows-latest
14+
ghc: '8.10.2' # broken due to https://gitlab.haskell.org/ghc/ghc/-/issues/18550
15+
- os: windows-latest
16+
ghc: '8.8.4' # also fails due to segfault :(
17+
- os: windows-latest
18+
ghc: '8.8.3' # fails due to segfault
19+
- os: windows-latest
20+
ghc: '8.8.2' # fails due to error with Cabal
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
submodules: true
26+
- uses: actions/setup-haskell@v1
27+
with:
28+
ghc-version: ${{ matrix.ghc }}
29+
cabal-version: '3.2'
30+
enable-stack: true
31+
32+
- name: Cache Cabal
33+
uses: actions/cache@v2
34+
env:
35+
cache-name: cache-cabal
36+
with:
37+
path: ~/.cabal/
38+
key: ${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
39+
restore-keys: |
40+
${{ runner.os }}-${{ matrix.ghc }}-build-${{ env.cache-name }}-
41+
${{ runner.os }}-${{ matrix.ghc }}-build-
42+
${{ runner.os }}-${{ matrix.ghc }}
43+
44+
- run: cabal update
45+
46+
# Need this to work around filepath length limits in Windows
47+
- name: Shorten binary names
48+
shell: bash
49+
run: |
50+
sed -i.bak -e 's/haskell-language-server/hls/g' \
51+
-e 's/haskell_language_server/hls/g' \
52+
haskell-language-server.cabal
53+
sed -i.bak -e 's/Paths_haskell_language_server/Paths_hls/g' \
54+
src/**/*.hs exe/*.hs
55+
56+
- name: Build
57+
shell: bash
58+
# Retry it three times to workaround compiler segfaults in windows
59+
run: cabal build || cabal build || cabal build
60+
61+
- name: Test func-test suite
62+
shell: bash
63+
env:
64+
HLS_TEST_EXE: hls
65+
HLS_WRAPPER_TEST_EXE: hls-wrapper
66+
# run the tests without parallelism, otherwise tasty will attempt to run
67+
# all functional test cases simultaneously which causes way too many hls
68+
# instances to be spun up for the poor github actions runner to handle
69+
run: cabal test func-test --test-options="-j1 --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"
70+
71+
- name: Test wrapper-test suite
72+
shell: bash
73+
env:
74+
HLS_TEST_EXE: hls
75+
HLS_WRAPPER_TEST_EXE: hls-wrapper
76+
# run the tests without parallelism, otherwise tasty will attempt to run
77+
# all functional test cases simultaneously which causes way too many hls
78+
# instances to be spun up for the poor github actions runner to handle
79+
run: cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1" || cabal test wrapper-test --test-options="-j1"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ cabal.project.local
66
*~
77
*.lock
88

9+
.tasty-rerun-log
10+
911
# shake build information
1012
_build/
1113

0 commit comments

Comments
 (0)