haskell / haskell/lsp

lsp-test: fromJust crash in sendRequest

Open
#330 1 comment 0 reactions 0 assignees View on GitHub
component: lsp-test type: bug
Dominant language
Haskell
Stars
423
Forks
105
PR merge metrics
No merged PRs in 30d

Description

My tests randomly crash with:
```
test-binary: Maybe.fromJust: Nothing
CallStack (from HasCallStack):
error, called at libraries/base/Data/Maybe.hs:148:21 in base:Data.Maybe
fromJust, called at src/Language/LSP/Test.hs:327:20 in lsp-test-0.14.0.0-26fxKpgpCT6HDpy4E8JMz7:Language.LSP.Test


### Error in: Unit tests - Dirties generateTargets after file edit
Timed out waiting to receive a message from the server.
Cases: 1 Tried: 1 Errors: 1 Failures: 0
```

Could this be a concurrency issue? The code doesn't seem thread-safe:

https://github.com/haskell/lsp/blob/6b34b5b1978a89e70c503b91bcf1bfdf60221e0c/lsp-test/src/Language/LSP/Test.hs#L318-L327

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.