Skip to content

lsp-test: Catch timeout on no message? #322

Open
@strager

Description

@strager

In my program which uses lsp-test, I need to wait for either of the following conditions to be true:

  • server sends a textDocument/publishDiagnostics notification
  • 1 second elapses

How can I implement this with lsp-test?


I tried adding an API to lsp-test to make what I want possible. However, my implementation has problems. In short, it seems that conduit-parser is not well-suited for this task because alternatives can't "sleep"; calling await blocks all alternatives. Here's the code, including a failing test demonstrating some problems with my API: 06e2224

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions