Skip to content

Commit 80b97d5

Browse files
committed
Merge branch 'master' into package-name-2
2 parents 4ff22a6 + 9effc56 commit 80b97d5

File tree

232 files changed

+10043
-6750
lines changed

Some content is hidden

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

232 files changed

+10043
-6750
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ defaults: &defaults
7575

7676
version: 2
7777
jobs:
78-
stackage-lts19:
78+
stackage-lts21:
7979
environment:
80-
- STACK_FILE: "stack-lts19.yaml"
80+
- STACK_FILE: "stack-lts21.yaml"
8181
<<: *defaults
8282

8383
stackage-nightly:
@@ -90,5 +90,5 @@ workflows:
9090
version: 2
9191
multiple-ghcs:
9292
jobs:
93-
- stackage-lts19
93+
- stackage-lts21
9494
- stackage-nightly

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ runs:
3131
sudo chown -R $USER /usr/local/.ghcup
3232
shell: bash
3333

34-
- uses: haskell/actions/setup@v2.4.3
34+
- uses: haskell/actions/setup@v2.4.4
3535
id: HaskEnvSetup
3636
with:
3737
ghc-version : ${{ inputs.ghc }}

.github/workflows/bench.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
example: ['cabal', 'lsp-types']
122122

123123
steps:
124-
- uses: haskell/actions/setup@v2.4.3
124+
- uses: haskell/actions/setup@v2.4.4
125125
with:
126126
ghc-version : ${{ matrix.ghc }}
127127
cabal-version: ${{ matrix.cabal }}

.github/workflows/hackage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
"hls-class-plugin", "hls-eval-plugin", "hls-explicit-imports-plugin",
3535
"hls-haddock-comments-plugin", "hls-hlint-plugin", "hls-stan-plugin",
3636
"hls-module-name-plugin", "hls-pragmas-plugin",
37-
"hls-refine-imports-plugin", "hls-rename-plugin", "hls-retrie-plugin",
37+
"hls-rename-plugin", "hls-retrie-plugin",
3838
"hls-splice-plugin", "hls-tactics-plugin",
3939
"hls-call-hierarchy-plugin", "hls-alternate-number-format-plugin",
4040
"hls-qualify-imported-names-plugin", "hls-code-range-plugin",

.github/workflows/nix.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ jobs:
103103
# We only build nix dev shell for current GHC version because some are
104104
# failing with different GHC version on darwin.
105105
- name: Build development shell with nix dependencies for current GHC version
106+
if: matrix.os == 'macOS-latest'
107+
run: nix develop --print-build-logs .#haskell-language-server-dev-nix --profile dev
108+
- name: Build development shells with nix dependencies
109+
if: matrix.os == 'ubuntu-latest'
106110
run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev
107111
- name: Push development shell
108112
if: ${{ env.HAS_TOKEN == 'true' }}

.github/workflows/test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
, "**/stack*.yaml"
4242
, ".gitlab-ci.yaml"
4343
, ".gitlab/**"
44+
, "CODEOWNERS"
4445
]'
4546
# If we only change ghcide downstream packages we have not test ghcide itself
4647
- id: skip_ghcide_check
@@ -178,10 +179,6 @@ jobs:
178179
name: Test hls-tactics-plugin test suite
179180
run: cabal test hls-tactics-plugin --test-options="$TEST_OPTS" || cabal test hls-tactics-plugin --test-options="$TEST_OPTS"
180181

181-
- if: matrix.test
182-
name: Test hls-refine-imports-plugin test suite
183-
run: cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-refine-imports-plugin --test-options="$TEST_OPTS"
184-
185182
- if: matrix.test
186183
name: Test hls-explicit-imports-plugin test suite
187184
run: cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS" || cabal test hls-explicit-imports-plugin --test-options="$TEST_OPTS"

.hlint.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@
117117
- Wingman.Judgements
118118
- Wingman.Machinery
119119
- Wingman.Tactics
120+
- CompletionTests #Previously part of GHCIDE Main tests
121+
- DiagnosticTests #Previously part of GHCIDE Main tests
122+
- FindDefinitionAndHoverTests #Previously part of GHCIDE Main tests
123+
- TestUtils #Previously part of GHCIDE Main tests
124+
- CodeLensTests #Previously part of GHCIDE Main tests
120125

121126
- name: [Prelude.tail, Data.List.tail]
122127
within:
@@ -126,6 +131,7 @@
126131
- Development.IDE.Plugin.CodeAction.ExactPrint
127132
- Development.IDE.Session
128133
- UnificationSpec
134+
- WatchedFileTests #Previously part of GHCIDE Main tests
129135

130136
- name: [Prelude.last, Data.List.last]
131137
within:
@@ -137,6 +143,7 @@
137143
- Ide.PluginUtils
138144
- Ide.Plugin.Eval.Parse.Comments
139145
- Ide.Plugin.Eval.CodeLens
146+
- FindDefinitionAndHoverTests #Previously part of GHCIDE Main tests
140147

141148
- name: [Prelude.init, Data.List.init]
142149
within:
@@ -146,6 +153,9 @@
146153
- Wingman.Metaprogramming.Parser
147154
- Development.Benchmark.Rules
148155
- ErrorGivenPartialSignature
156+
- IfaceTests #Previously part of GHCIDE Main tests
157+
- THTests #Previously part of GHCIDE Main tests
158+
- WatchedFileTests #Previously part of GHCIDE Main tests
149159

150160
- name: Data.List.foldl1'
151161
within: []
@@ -164,6 +174,8 @@
164174
- TErrorGivenPartialSignature
165175
- Wingman.CaseSplit
166176
- Wingman.Simplify
177+
- InitializeResponseTests #Previously part of GHCIDE Main tests
178+
- PositionMappingTests #Previously part of GHCIDE Main tests
167179

168180
- name: Data.Text.head
169181
within:
@@ -194,6 +206,7 @@
194206
- Development.IDE.Graph.Internal.Profile
195207
- Development.IDE.Graph.Internal.Rules
196208
- Ide.Plugin.Class
209+
- CodeLensTests #Previously part of GHCIDE Main tests
197210

198211
- name: "Data.Map.!"
199212
within:

CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
/plugins/hls-ormolu-plugin @georgefst
2424
/plugins/hls-pragmas-plugin @berberman @Ailrun @eddiemundo
2525
/plugins/hls-qualify-imported-names-plugin @eddiemundo
26-
/plugins/hls-refine-imports-plugin
2726
/plugins/hls-rename-plugin @OliverMadine
2827
/plugins/hls-refactor-plugin @santiweight
2928
/plugins/hls-retrie-plugin @pepeiborra
3029
/plugins/hls-code-range-plugin @kokobd
3130
/plugins/hls-splice-plugin @konn
3231
/plugins/hls-stylish-haskell-plugin @Ailrun
33-
/plugins/hls-tactics-plugin @isovector
32+
/plugins/hls-tactics-plugin
3433
/plugins/hls-stan-plugin @uhbif19
3534
/plugins/hls-explicit-record-fields-plugin @ozkutuk
3635
/plugins/hls-overloaded-record-dot-plugin @joyfulmantis

bench/MultiLayerModules.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
# Generate $DEPTH layers of modules with $WIDTH modules on each layer
3+
# Every module on layer N imports all the modules on layer N-1
4+
# MultiLayerModules.hs imports all the modules from the last layer
5+
DEPTH=15
6+
WIDTH=40
7+
cat >hie.yaml << EOF
8+
cradle:
9+
direct:
10+
arguments:
11+
EOF
12+
for i in $(seq -w 1 $WIDTH); do
13+
echo "module DummyLevel0M$i where" > DummyLevel0M$i.hs;
14+
echo " - DummyLevel0M$i.hs" >> hie.yaml;
15+
done
16+
for l in $(seq 1 $DEPTH); do
17+
for i in $(seq -w 1 $WIDTH); do
18+
echo "module DummyLevel${l}M$i where" > DummyLevel${l}M$i.hs;
19+
echo " - DummyLevel${l}M$i.hs" >> hie.yaml;
20+
for j in $(seq -w 1 $WIDTH); do
21+
echo "import DummyLevel$((l-1))M$j" >> DummyLevel${l}M$i.hs;
22+
done
23+
done
24+
done
25+
case "$1" in
26+
'--th')
27+
echo "{-# LANGUAGE TemplateHaskell #-}" > MultiLayerModules.hs
28+
;;
29+
esac
30+
echo "module MultiLayerModules where" >> MultiLayerModules.hs
31+
echo " - MultiLayerModules.hs" >> hie.yaml;
32+
for j in $(seq -w 1 $WIDTH); do
33+
echo "import DummyLevel${DEPTH}M$j" >> MultiLayerModules.hs;
34+
done

bench/config.yaml

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,50 @@ examples:
3333
modules:
3434
- src/Language/LSP/Types/WatchedFiles.hs
3535
- src/Language/LSP/Types/CallHierarchy.hs
36+
37+
- name: MultiLayerModules
38+
path: bench/MultiLayerModules.sh
39+
script: True
40+
script-args: ["--th"]
41+
modules:
42+
- MultiLayerModules.hs
43+
- DummyLevel0M01.hs
44+
- DummyLevel1M01.hs
45+
- name: MultiLayerModulesNoTH
46+
path: bench/MultiLayerModules.sh
47+
script: True
48+
script-args: []
49+
modules:
50+
- MultiLayerModules.hs
51+
- DummyLevel0M01.hs
52+
- DummyLevel1M01.hs
53+
54+
- name: DummyLevel0M01
55+
path: bench/MultiLayerModules.sh
56+
script: True
57+
script-args: ["--th"]
58+
modules:
59+
- DummyLevel0M01.hs
60+
- name: DummyLevel0M01NoTH
61+
path: bench/MultiLayerModules.sh
62+
script: True
63+
script-args: []
64+
modules:
65+
- DummyLevel0M01.hs
66+
67+
- name: DummyLevel1M01
68+
path: bench/MultiLayerModules.sh
69+
script: True
70+
script-args: ["--th"]
71+
modules:
72+
- DummyLevel1M01.hs
73+
- name: DummyLevel1M01NoTH
74+
path: bench/MultiLayerModules.sh
75+
script: True
76+
script-args: []
77+
modules:
78+
- DummyLevel1M01.hs
79+
3680
# Small but heavily multi-component example
3781
# Disabled as it is far to slow. hie-bios >0.7.2 should help
3882
# - name: HLS
@@ -47,6 +91,7 @@ examples:
4791

4892
# The set of experiments to execute
4993
experiments:
94+
- "edit-header"
5095
- "edit"
5196
- "hover"
5297
- "hover after edit"
@@ -140,7 +185,6 @@ configurations:
140185
- ormolu
141186
- pragmas
142187
- qualifyImportedNames
143-
- refineImports
144188
- rename
145189
- stylish-haskell
146190
# - alternateNumberFormat
@@ -168,7 +212,6 @@ configurations:
168212
# # - ormolu
169213
# - pragmas
170214
# - qualifyImportedNames
171-
# - refineImports
172215
# - rename
173216
# - retrie
174217
# - splice

cabal.project

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ packages:
1616
./plugins/hls-class-plugin
1717
./plugins/hls-eval-plugin
1818
./plugins/hls-explicit-imports-plugin
19-
./plugins/hls-refine-imports-plugin
2019
./plugins/hls-hlint-plugin
2120
./plugins/hls-rename-plugin
2221
./plugins/hls-retrie-plugin

configuration-ghc-90.nix

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ let
1414
doCheck = false;
1515
});
1616
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
17-
# ptr-poker breaks on MacOS without SSE2 optimizations
18-
# https://github.com/nikita-volkov/ptr-poker/issues/11
19-
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
20-
2117
Cabal = hself.Cabal_3_6_3_0;
2218

2319
Cabal-syntax = hself.Cabal-syntax_3_8_1_0;
2420

25-
ghc-lib-parser = hself.callCabal2nix "ghc-lib-parser" inputs.ghc-lib-parser-94 {};
21+
ghc-lib-parser = hsuper.ghc-lib-parser_9_4_5_20230430;
2622

2723
lsp = hself.callCabal2nix "lsp" inputs.lsp {};
2824
lsp-types = hself.callCabal2nix "lsp-types" inputs.lsp-types {};
@@ -42,7 +38,7 @@ let
4238

4339
ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-052 {};
4440

45-
fourmolu = hself.callHackage "fourmolu" "0.10.1.0" {};
41+
fourmolu = hsuper.fourmolu_0_10_1_0;
4642

4743
# Re-generate HLS drv excluding some plugins
4844
haskell-language-server =

configuration-ghc-92.nix

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,25 @@ let
2121
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
2222
apply-refact = hsuper.apply-refact_0_13_0_0;
2323

24-
# ptr-poker breaks on MacOS without SSE2 optimizations
25-
# https://github.com/nikita-volkov/ptr-poker/issues/11
26-
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
27-
2824
Cabal-syntax = hself.Cabal-syntax_3_8_1_0;
2925

30-
ghc-lib-parser = hself.callCabal2nix "ghc-lib-parser" inputs.ghc-lib-parser-94 {};
26+
ghc-lib-parser = hsuper.ghc-lib-parser_9_4_5_20230430;
3127

3228
hlint = appendConfigureFlag (hself.callCabal2nix "hlint" inputs.hlint-35 {}) "-fghc-lib";
3329

3430
ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-052 {};
3531

36-
fourmolu = hself.callHackage "fourmolu" "0.10.1.0" {};
32+
fourmolu = hsuper.fourmolu_0_10_1_0;
3733

38-
stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib";
34+
stylish-haskell = hsuper.stylish-haskell_0_14_4_0;
3935

4036
hie-bios = hself.callCabal2nix "hie-bios" inputs.haskell-hie-bios { };
4137

4238
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.haskell-implicit-hie-cradle { };
4339

4440
lsp = hself.callCabal2nix "lsp" inputs.lsp {};
4541
lsp-types = hself.callCabal2nix "lsp-types" inputs.lsp-types {};
46-
lsp-test = hself.callCabal2nix "lsp-test" inputs.lsp-test {};
42+
lsp-test = dontCheck (hself.callCabal2nix "lsp-test" inputs.lsp-test {});
4743

4844
# Re-generate HLS drv excluding some plugins
4945
haskell-language-server =

configuration-ghc-94.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ let
1515
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
1616
apply-refact = hsuper.apply-refact_0_13_0_0;
1717

18+
fourmolu = dontCheck (hself.callCabal2nix "fourmolu" inputs.fourmolu-011 {});
19+
1820
stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib";
1921

2022
lsp = hself.callCabal2nix "lsp" inputs.lsp {};
2123
lsp-types = hself.callCabal2nix "lsp-types" inputs.lsp-types {};
22-
lsp-test = hself.callCabal2nix "lsp-test" inputs.lsp-test {};
24+
lsp-test = dontCheck (hself.callCabal2nix "lsp-test" inputs.lsp-test {});
2325

2426
# Re-generate HLS drv excluding some plugins
2527
haskell-language-server =

configuration-ghc-96.nix

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,24 @@ let
2929
doCheck = false;
3030
});
3131
apply-refact = hsuper.apply-refact_0_13_0_0;
32-
tagged = hself.callHackage "tagged" "0.8.7" { };
33-
primitive = hself.callHackage "primitive" "0.8.0.0" { };
34-
unix-compat = hself.callCabal2nix "unix-compat" inputs.haskell-unix-compat { };
35-
MonadRandom = hself.callHackage "MonadRandom" "0.6" { };
36-
hiedb = hself.callCabal2nix "hiedb" inputs.haskell-hiedb { };
32+
tagged = hsuper.tagged_0_8_7;
33+
primitive = hsuper.primitive_0_8_0_0;
34+
MonadRandom = hsuper.MonadRandom_0_6;
3735
hie-bios = hself.callCabal2nix "hie-bios" inputs.haskell-hie-bios { };
36+
hlint = hself.callCabal2nix "hlint" inputs.hlint-36 {};
3837
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.haskell-implicit-hie-cradle { };
39-
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.haskell-ghc-exactprint { };
4038

41-
# ptr-poker breaks on MacOS without SSE2 optimizations
42-
# https://github.com/nikita-volkov/ptr-poker/issues/11
43-
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };
39+
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-012 {};
4440

45-
ormolu = hself.ormolu_0_5_3_0;
41+
ghc-lib-parser-ex = hsuper.ghc-lib-parser-ex_9_6_0_0;
4642

47-
# TODO: smunix: nix fails to build fourmolu-0.13 from Hackage with these errors:
48-
# tar: */fourmolu/0.13.0.0/fourmolu.json: Not found in archive
49-
# tar: */fourmolu/0.13.0.0/fourmolu.cabal: Not found in archive
50-
# tar: Exiting with failure status due to previous errors
51-
# As an alternative, we could build directly from github:fourmolu. How do people
52-
# feel about this?
53-
fourmolu = hself.callHackage "fourmolu" "0.12.0.0" {};
43+
ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-07 {};
5444

55-
stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib";
45+
stylish-haskell = hself.callCabal2nix "stylish-haskell" inputs.stylish-haskell-0145 {};
5646

5747
lsp = hself.callCabal2nix "lsp" inputs.lsp {};
5848
lsp-types = hself.callCabal2nix "lsp-types" inputs.lsp-types {};
59-
lsp-test = hself.callCabal2nix "lsp-test" inputs.lsp-test {};
49+
lsp-test = dontCheck (hself.callCabal2nix "lsp-test" inputs.lsp-test {});
6050

6151
# Re-generate HLS drv excluding some plugins
6252
haskell-language-server =

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Here is a list of the additional settings currently supported by `haskell-langua
5050
Plugins have a generic config to control their behaviour. The schema of such config is:
5151

5252
- `haskell.plugin.${pluginName}.globalOn`: usually with default true. Whether the plugin is enabled at runtime or it is not. That is the option you might use if you want to disable completely a plugin.
53-
- Actual plugin names are: `ghcide-code-actions-fill-holes`, `ghcide-completions`, `ghcide-hover-and-symbols`, `ghcide-type-lenses`, `ghcide-code-actions-type-signatures`, `ghcide-code-actions-bindings`, `ghcide-code-actions-imports-exports`, `eval`, `moduleName`, `pragmas`, `refineImports`, `importLens`, `class`, `tactics` (aka wingman), `hlint`, `haddockComments`, `retrie`, `rename`, `splice`, `stan`.
53+
- Actual plugin names are: `ghcide-code-actions-fill-holes`, `ghcide-completions`, `ghcide-hover-and-symbols`, `ghcide-type-lenses`, `ghcide-code-actions-type-signatures`, `ghcide-code-actions-bindings`, `ghcide-code-actions-imports-exports`, `eval`, `moduleName`, `pragmas`, `importLens`, `class`, `tactics` (aka wingman), `hlint`, `haddockComments`, `retrie`, `rename`, `splice`, `stan`.
5454
- So to disable the import lens with an explicit list of module definitions you could set `haskell.plugin.importLens.globalOn: false`
5555
- `haskell.plugin.${pluginName}.${lspCapability}On`: usually with default true. Whether a concrete plugin capability is enabled.
5656
- Capabilities are the different ways a lsp server can interact with the editor. The current available capabilities of the server are: `callHierarchy`, `codeActions`, `codeLens`, `diagnostics`, `hover`, `symbols`, `completion`, `rename`.

0 commit comments

Comments
 (0)