Skip to content

Applying hints fails with HLS 1.0.0 #1443

Closed
@lylek

Description

@lylek

With HLS 0.9.0, applying hints would hang. So I patiently waited for the next release. Now with HLS 1.0.0, it fails instead of hanging. Here's a section of debug output from when I tried to apply a hint. You will see some errors therein, one of which says to "please report". I see that there's a parse error when the server unexpectedly returned a Null. There's also an error about a missing file. Not sure what's most relevant but I hope this helps diagnose the problem. Not sure whether it's an issue with the extension or with the server.

2021-02-25 11:07:42.622326 [ThreadId 5] DEBUG haskell-lsp.parseOne:	---> {"jsonrpc":"2.0","id":78,"method":"workspace/executeCommand","params":{"command":"27652:hlint:applyOne","arguments":[{"file":"file:///Users/lyle/ExaTMS/src/TripShot/Bz/OnDemand/Scheduling/RideCandidates.hs","start_pos":{"character":38,"line":249},"hintTitle":"Use <>"}]}}
2021-02-25 11:07:42.622967 [ThreadId 7] DEBUG haskell-lsp.sendServer:	<--2--{"id":60,"method":"window/workDoneProgress/create","params":{"token":5},"jsonrpc":"2.0"}
2021-02-25 11:07:42.622893 [ThreadId 11743] INFO hls:	hlint:applyOneCmd:file=NormalizedFilePath "/Users/lyle/ExaTMS/src/TripShot/Bz/OnDemand/Scheduling/RideCandidates.hs"
2021-02-25 11:07:42.623077 [ThreadId 7] DEBUG haskell-lsp.sendServer:	<--2--{"method":"$/progress","params":{"token":5,"value":{"title":"Applying hint: Use <>","kind":"begin","cancellable":true}},"jsonrpc":"2.0"}
2021-02-25 11:07:42.623197 [ThreadId 5] DEBUG haskell-lsp.parseOne:	---> {"jsonrpc":"2.0","id":60,"result":null}
2021-02-25 11:07:42.623362 [ThreadId 11744] INFO hls:	hlint:getIdeas:file:NormalizedFilePath "/Users/lyle/ExaTMS/src/TripShot/Bz/OnDemand/Scheduling/RideCandidates.hs"
2021-02-25 11:07:42.623408 [ThreadId 7] DEBUG haskell-lsp.sendServer:	<--2--{"method":"window/logMessage","params":{"message":"haskell-lsp:incoming message parse error. {\"jsonrpc\":\"2.0\",\"id\":60,\"result\":null} Error in $.result: parsing () failed, expected Array, but encountered Null\n","type":1},"jsonrpc":"2.0"}
2021-02-25 11:07:42.623526 [ThreadId 11744] INFO hls:	finish: applyHint (took 0.00s)
[Error - 11:07:42 AM] haskell-lsp:incoming message parse error. {"jsonrpc":"2.0","id":60,"result":null} Error in $.result: parsing () failed, expected Array, but encountered Null

2021-02-25 11:07:42.623528 [ThreadId 11743] INFO hls:	applyHint:apply=[[Replace {rtype = Expr, pos = SrcSpan {startLine = 250, startCol = 39, endLine = 250, endCol = 126}, subts = [("a",SrcSpan {startLine = 250, startCol = 39, endLine = 250, endCol = 74}),("b",SrcSpan {startLine = 250, startCol = 78, endLine = 250, endCol = 126})], orig = "a <> b"}]]
2021-02-25 11:07:43.037141 [ThreadId 11746] INFO hls:	finish: applyHint (took 0.00s)
2021-02-25 11:07:43.037224 [ThreadId 11748] INFO hls:	finish: applyHint (took 0.00s)
2021-02-25 11:07:43.037321 [ThreadId 11750] INFO hls:	finish: applyHint (took 0.00s)
Missing file: /Users/runner/.ghcup/ghc/8.10.4/lib/ghc-8.10.4/settings
2021-02-25 11:07:43.037602 [ThreadId 7] DEBUG haskell-lsp.sendServer:	<--2--{"method":"$/progress","params":{"token":5,"value":{"kind":"end"}},"jsonrpc":"2.0"}
2021-02-25 11:07:43.037611 [ThreadId 11740] ERROR hls:	Unexpected exception on request, please report!
Exception: ExitFailure 1
[Error - 11:07:43 AM] Request workspace/executeCommand failed.
  Message: ExitFailure 1
  Code: -32603 
2021-02-25 11:07:43.037821 [ThreadId 7] DEBUG haskell-lsp.sendServer:	<--2--{"id":78,"jsonrpc":"2.0","error":{"message":"ExitFailure 1","code":-32603}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions