Skip to content

Apply hint never finishes -- no error in the log #3385

@talldeveloper

Description

@talldeveloper

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
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs infoNot actionable, because there's missing informationtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions