haskell / lsp

Haskell library for the Microsoft Language Server Protocol
359 stars 89 forks source link

Avoid couple partial functions in lsp-test #546

Closed jhrcek closed 5 months ago

jhrcek commented 5 months ago

Was anyone able to figure out why there are sometimes timeout messages (apparently unrelated to actual code changes) of the following king in hls test suite?

Test suite tests: RUNNING...
eval
  Property checking:                                            FAIL (66.02s)
    Timed out waiting to receive a message from the server.
    Last message received:
    {
        "jsonrpc": "2.0",
        "method": "$/progress",
        "params": {
            "token": "28",
            "value": {
                "kind": "end",
                "message": "Finished indexing 5 files"
            }
        }
    }
    Use -p '/Property checking/' to rerun this test only.

U briefly checked how lsp-test works and was surprised by the amount of partial functions used. Here's a few easy to replace occurrences of fromJust + couple hard-to-resist hlint suggestions.

jhrcek commented 5 months ago

Found this which answers my questions about test flakiness so closing this PR.