haskell / haskell/haskell-language-server

Apply hint never finishes -- no error in the log

Open
#3,385 6 comments 0 reactions 0 assignees View on GitHub
status: needs info type: bug
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
2d 19h
Merged PRs (30d)
11

Description

### Your environment

Which OS do you use?
Windows 10 Home 22H2
Which version of GHC do you use and how did you install it?
9.2.4 via ghcup
How is your project built (alternative: link to the project)?
cabal build

Which LSP client (editor/plugin) do you use?
VSCode + Haskell plugin
Which version of HLS do you use and how did you install it?
1.8.0.0 via ghcup
Have you configured HLS in any way (especially: a `hie.yaml` file)?
no

### Steps to reproduce

Apply a hlint suggestion (right-click, quick fix, apply hint)

### Expected behaviour

The hint should be applied to the code

### Actual behaviour

The "applying hint" notification keeps spinning, but nothing happens

### Debug information

I set logging to verbose, but no error is shown in the log. When applying the hint:

`[Trace - 8:35:35 PM] Received response 'textDocument/codeAction - (32)' in 30ms.
Result: [
{
"command": {
"arguments": [
{
"file": "file:///c%3A/Users/Arno%20Prive/Projects/aoc2022/app/Day06.hs",
"hintTitle": "Redundant $",
"start_pos": {
"character": 31,
"line": 21
}
}
],
"command": "15004:hlint:applyOne",
"title": "Apply hint \"Redundant $\""
},
"diagnostics": [
{
"code": "refact:Redundant $",
"message": "Redundant $\nFound:\n (show . firstUnique) $ 4\nWhy not:\n (show . firstUnique) 4\n",
"range": {
"end": {
"character": 32,
"line": 21
},
"start": {
"character": 31,
"line": 21
}
},
"severity": 3,
"source": "hlint"
}
],
"isPreferred": true,
"kind": "quickfix",
"title": "Apply hint \"Redundant $\""
},
{
"diagnostics": [
{
"code": "refact:Redundant $",
"message": "Redundant $\nFound:\n (show . firstUnique) $ 4\nWhy not:\n (show . firstUnique) 4\n",
"range": {
"end": {
"character": 32,
"line": 21
},
"start": {
"character": 31,
"line": 21
}
},
"severity": 3,
"source": "hlint"
}
],
"edit": {
"changes": {
"file:///c%3A/Users/Arno%20Prive/Projects/aoc2022/app/Day06.hs": [
{
"newText": "{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-}\n{-# HLINT ignore \"Redundant $\" #-}\n",
"range": {
"end": {
"character": 0,
"line": 0
},
"start": {
"character": 0,
"line": 0
}
}
}
]
}
},
"isPreferred": false,
"kind": "quickfix",
"title": "Ignore hint \"Redundant $\" in this module"
}
]

[Trace - 8:35:39 PM] Sending request 'workspace/executeCommand - (33)'.
Params: {
"command": "15004:hlint:applyOne",
"arguments": [
{
"file": "file:///c%3A/Users/Arno%20Prive/Projects/aoc2022/app/Day06.hs",
"hintTitle": "Redundant $",
"start_pos": {
"character": 31,
"line": 21
}
}
]
}

[Trace - 8:35:39 PM] Received request 'window/workDoneProgress/create - (10)'.
Params: {
"token": 1
}

[Trace - 8:35:39 PM] Sending response 'window/workDoneProgress/create - (10)'. Processing request took 0ms
No result returned.

[Trace - 8:35:39 PM] Received notification '$/progress'.
Params: {
"token": 1,
"value": {
"cancellable": true,
"kind": "begin",
"title": "Applying hint: Redundant $"
}
}

2022-12-06T19:36:23.170769Z | Info | Live bytes: 83.85MB Heap size: 377.49MB
[Trace - 8:36:23 PM] Received notification 'window/logMessage'.
Params: {
"message": "Live bytes: 83.85MB Heap size: 377.49MB",
"type": 3
}

[Info - 8:36:23 PM] Live bytes: 83.85MB Heap size: 377.49MB
`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.