Skip to content

VSCode Extension: SQLMesh LSP crashes on startup: ImportError: cannot import name 'WorkspaceDiagnosticRefreshRequest' with lsprotocol 2025.x #5768

@Agen68

Description

@Agen68

Description

Starting the SQLMesh Language Server (via tcloud / enterprise LSP) fails during import: sqlmesh.lsp.main imports WorkspaceDiagnosticRefreshRequest from lsprotocol.types, but that symbol is not available in lsprotocol 2025.x, so the process exits and the VS Code extension reports a failed LSP connection.

Environment

  • OS: Windows
  • Editor: VS Code / Cursor + SQLMesh extension
  • Python: 3.11 (project .venv as workspace interpreter)

Steps to reproduce

  1. Install current tcloud in a clean venv (e.g. pip install tcloud).
  2. Open a SQLMesh project and use that venv as the Python interpreter.
  3. Trigger the SQLMesh extension / LSP (e.g. reload window).

Expected

Language server starts without import errors.

Actual

Server process exits with:
ImportError: cannot import name 'WorkspaceDiagnosticRefreshRequest' from 'lsprotocol.types'

(Extension may also show generic LSP errors such as “couldn’t create connection to server” or exit code 1.)

Versions

Package Version
tcloud 2.11.0
sqlmesh 0.232.0
lsprotocol 2025.0.0
pygls 2.1.1

Workaround

pip uninstall -y lsprotocol pygls
pip install "lsprotocol<2025" "pygls<2.0"
python -c "from lsprotocol.types import WorkspaceDiagnosticRefreshRequest; print('ok')"

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