Skip to content

Commit 51df91d

Browse files
authored
Merge branch 'haskell:master' into master
2 parents 3d5080a + 3c2364b commit 51df91d

29 files changed

+415
-140
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@ assignees: ''
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). This explains some common issues and will also help you to find the information that the issue template asks for.
11+
Before opening an issue, 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.
1213
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+
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!
1416
-->
1517

1618
### Your environment
1719

1820
Which OS do you use:
1921
<!-- Windows, MacOS, Ubuntu, ArchLinux, etc... -->
20-
Which lsp-client do you use:
21-
<!-- Neovim, emacs, VS Codium, etc... -->
22+
Which LSP client (editor/plugin) do you use:
23+
<!-- Neovim+LanguageClient-neovim, emacs+lsp-mode, VS Codium+vscode-haskell, etc... -->
2224
Describe your project (alternative: link to the project):
2325
<!-- stack.yaml, package.yaml, *.cabal files, cabal.project, hie.yaml -->
2426

@@ -32,26 +34,5 @@ Describe your project (alternative: link to the project):
3234
<!-- Tell us what happens instead. -->
3335

3436
### 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>
37+
38+
<!-- Include any useful debug information, such as relevant log snippets. -->

.github/workflows/bench.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: fkirc/skip-duplicate-actions@v3.4.1
2525
with:
2626
cancel_others: false
27-
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml"]'
27+
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml", "**/stack*.yaml"]'
2828

2929
bench_init:
3030
if: needs.pre_job.outputs.should_skip != 'true'
@@ -203,6 +203,5 @@ jobs:
203203
echo "jobs info: ${{ toJSON(needs) }}"
204204
- if: contains(needs.*.result, 'failure')
205205
run: exit 1
206-
- if: contains(needs.*.result, 'cancelled')
207-
name: cancelling
208-
uses: andymckay/cancel-action@0.2
206+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
207+
run: exit 1

.github/workflows/caching.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ on:
3030
push:
3131
branches:
3232
- master
33+
schedule:
34+
# Refresh snapshot every (02+8*x):25 UTC
35+
# When cache is present it is a light check workflow with early termination.
36+
# When primary cache is not hit - runs the cache generation.
37+
# Why: GitHub repo has 10G pool & on overflow GitHub removes caches in FIFO manner.
38+
# When internal branche PRs save into the same pool -
39+
# their cache is accessible only inside of the scope of the PR.
40+
# If main cache is forced out - there are no cache shared between PRs,
41+
# which implies all PRs would start to create & save their cache.
42+
# Reinstitution of the main chache puts it back into FIFO
43+
# & so it gets shared across all PRs.
44+
- cron: "25 2/8 * * *"
3345

3446
env:
3547
cabalBuild: "v2-build all --enable-tests --enable-benchmarks"
@@ -78,7 +90,7 @@ jobs:
7890
- if: runner.os == 'Windows'
7991
name: (Windows) Platform config
8092
run: |
81-
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
93+
echo "CABAL_PKGS_DIR=C:\\cabal\\packages" >> $GITHUB_ENV
8294
- if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
8395
name: (Linux,macOS) Platform config
8496
run: |
@@ -130,6 +142,7 @@ jobs:
130142
restore-keys: ${{ env.cache-name }}-
131143

132144
- name: Compiled deps cache
145+
id: compiled-deps
133146
uses: actions/cache@v2
134147
env:
135148
cache-name: compiled-deps
@@ -141,9 +154,12 @@ jobs:
141154
${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
142155
${{ env.cache-name }}-${{ runner.os }}-
143156
144-
- run: cabal update
157+
- if: (! steps.compiled-deps.outputs.cache-hit)
158+
run: |
159+
cabal update
145160
146-
- name: Download all sources
161+
- if: (! steps.compiled-deps.outputs.cache-hit)
162+
name: Download all sources
147163
run: |
148164
cabal $cabalBuild --only-download
149165
@@ -152,7 +168,8 @@ jobs:
152168
# but to cache what can be cached, so step is fault tolerant & would always succseed.
153169
# 2021-12-11: NOTE: Building all targets, since
154170
# current Cabal does not allow `all --enable-tests --enable-benchmarks --only-dependencies`
155-
- name: Build all targets; try 3 times
171+
- if: (! steps.compiled-deps.outputs.cache-hit)
172+
name: Build all targets; try 3 times
156173
continue-on-error: true
157174
run: |
158175
cabal $cabalBuild || cabal $cabalBuild || cabal $cabalBuild

.github/workflows/nix.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: fkirc/skip-duplicate-actions@v3.4.1
2525
with:
2626
cancel_others: false
27-
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**/README.md", "FUNDING.yml"]'
27+
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**/README.md", "FUNDING.yml", "**/stack*.yaml"]'
2828
- id: skip_check_no_nix
2929
uses: fkirc/skip-duplicate-actions@v3.4.1
3030
with:
@@ -114,6 +114,5 @@ jobs:
114114
echo "jobs info: ${{ toJSON(needs) }}"
115115
- if: contains(needs.*.result, 'failure')
116116
run: exit 1
117-
- if: contains(needs.*.result, 'cancelled')
118-
name: cancelling
119-
uses: andymckay/cancel-action@0.2
117+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
118+
run: exit 1

.github/workflows/test.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: fkirc/skip-duplicate-actions@v3.4.1
2626
with:
2727
cancel_others: false
28-
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml", ".circleci/**"]'
28+
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml", ".circleci/**", "**/stack*.yaml"]'
2929
# If we only change ghcide downstream packages we have not test ghcide itself
3030
- id: skip_ghcide_check
3131
uses: fkirc/skip-duplicate-actions@v3.4.1
@@ -85,7 +85,7 @@ jobs:
8585
- if: runner.os == 'Windows'
8686
name: (Windows) Platform config
8787
run: |
88-
echo "CABAL_PKGS_DIR=~\\AppData\\cabal\\packages" >> $GITHUB_ENV
88+
echo "CABAL_PKGS_DIR=C:\\cabal\\packages" >> $GITHUB_ENV
8989
- if: ( runner.os == 'Linux' ) || ( runner.os == 'macOS' )
9090
name: (Linux,macOS) Platform config
9191
run: |
@@ -244,7 +244,7 @@ jobs:
244244
name: Test hls-hlint-plugin test suite
245245
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"
246246

247-
- if: matrix.test
247+
- if: matrix.test && false
248248
name: Test hls-alternate-number-format-plugin test suite
249249
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"
250250

@@ -261,6 +261,5 @@ jobs:
261261
echo "jobs info: ${{ toJSON(needs) }}"
262262
- if: contains(needs.*.result, 'failure')
263263
run: exit 1
264-
- if: contains(needs.*.result, 'cancelled')
265-
name: cancelling
266-
uses: andymckay/cancel-action@0.2
264+
- if: contains(needs.*.result, 'cancelled') && needs.pre_job.outputs.should_skip != 'true'
265+
run: exit 1

cabal-ghc901.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ package *
3737

3838
write-ghc-environment-files: never
3939

40-
index-state: 2021-11-29T12:30:07Z
40+
index-state: 2021-11-29T12:30:08Z
4141

4242
constraints:
4343
-- These plugins don't work on GHC9 yet

cabal-ghc921.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ package *
3636

3737
write-ghc-environment-files: never
3838

39-
index-state: 2021-11-29T12:30:07Z
39+
index-state: 2021-11-29T12:30:08Z
4040

4141
constraints:
4242
-- These plugins doesn't work on GHC92 yet

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ package *
4040

4141
write-ghc-environment-files: never
4242

43-
index-state: 2021-11-29T12:30:07Z
43+
index-state: 2021-11-29T12:30:08Z
4444

4545
constraints:
4646
hyphenation +embed

docs/conf.py

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,41 @@
1414
# import sys
1515
# sys.path.insert(0, os.path.abspath('.'))
1616

17+
import re
18+
import sys
1719

1820
# -- Project information -----------------------------------------------------
1921

2022
project = 'haskell-language-server'
21-
copyright = '2021, The Haskell IDE Team'
22-
author = 'The Haskell IDE Team'
2323

24-
# The full version, including alpha/beta/rc tags
25-
release = '1.3.0'
24+
# We want to take some of the metadata from the Cabal file, especially the version.
25+
# (otherwise it's very easy to forget to update it!)
26+
release = None
27+
copyright = None
28+
author = None
29+
versionPattern = re.compile("^version:\s*([\d.]+)")
30+
copyrightPattern = re.compile("^copyright:\s*(.+)")
31+
authorPattern = re.compile("^author:\s*(.+)")
32+
for i, line in enumerate(open('../haskell-language-server.cabal')):
33+
versionMatch = re.search(versionPattern, line)
34+
if versionMatch:
35+
release = versionMatch.group(1)
36+
copyrightMatch = re.search(copyrightPattern, line)
37+
if copyrightMatch:
38+
copyright = copyrightMatch.group(1)
39+
authorMatch = re.search(authorPattern, line)
40+
if authorMatch:
41+
author = authorMatch.group(1)
2642

43+
if not release:
44+
print("Couldn't find version")
45+
sys.exit()
46+
if not copyright:
47+
print("Couldn't find copyright")
48+
sys.exit()
49+
if not author:
50+
print("Couldn't find author")
51+
sys.exit()
2752

2853
# -- General configuration ---------------------------------------------------
2954

@@ -32,7 +57,8 @@
3257
# ones.
3358
extensions = [
3459
'myst_parser',
35-
'sphinx_rtd_theme'
60+
'sphinx_rtd_theme',
61+
'sphinx.ext.autosectionlabel'
3662
]
3763

3864
# Add any paths that contain templates here, relative to this directory.

docs/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You can watch demos for some of these features [below](#demos).
1717
- [Module name suggestions](#module-names) for insertion or correction
1818
- [Call hierarchy support](#call-hierarchy)
1919
- [Qualify names from an import declaration](#qualify-imported-names) in your code
20-
- [Suggest alternate numeric formats](#alternate-number-formatting)
20+
- [Suggest alternate numeric formats](#alternate-number-formatting). This plugin is not included by default yet due to a performance issue, see <https://github.com/haskell/haskell-language-server/issues/2490>
2121

2222
## Demos
2323

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
haskell-language-server
22
=======================
33

4-
Official haskell ide support via language server (LSP). Successor of `ghcide <https://github.com/haskell/ghcide>`_ and `haskell-ide-engine <https://github.com/haskell/haskell-ide-engine>`_. Read the `project's background <https://neilmitchell.blogspot.com/2020/01/one-haskell-ide-to-rule-them-all.html>`_.
4+
Official Haskell Language Server implementation. :ref:`Read more<What is haskell-language-server?>`.
55

66
.. toctree::
77
:maxdepth: 2
88

9+
what-is-hls
910
features
1011
installation
1112
supported-versions

docs/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ choco install haskell-language-server
3939

4040
If you are using Visual Studio Code, the [Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell) will automatically download and install `haskell-language-server` for you.
4141

42+
If you need to find the binaries, please consult the [documentation](https://github.com/haskell/vscode-haskell#downloaded-binaries) for the extension.
43+
4244
## Pre-built binaries
4345

4446
There are pre-built binaries available from the [releases page](https://github.com/haskell/haskell-language-server/releases) for Linux, Windows and macOS.

0 commit comments

Comments
 (0)