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

未关闭 适合新手
#5,768 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

@boomesh11 已经在做这个了。

开始于 2026年11月16日。

  • #6220 来自 @boomesh11 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
66/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
python
领域
devtools

调研方向

首先,在干净的环境中使用报告的包版本重现故障,然后检查 sqlmesh.lsp.main 以及项目中关于 lsprotocol 和 pygls 的依赖声明。使用受支持的依赖版本时,SQLMesh 语言服务器能够启动且不出现报告的导入错误,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Bug

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')"
主要语言
Python
星标
3.3k
派生
471
平均合并
6 天 7 小时
30 天内合并 PR
35

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

SQLMesh/sqlmesh 的其他 Issue

查看 SQLMesh/sqlmesh 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。