VSCode Extension: SQLMesh LSP crashes on startup: ImportError: cannot import name 'WorkspaceDiagnosticRefreshRequest' with lsprotocol 2025.x
维护者通常 4 天内回复
评估
调研方向
首先,在干净的环境中使用报告的包版本重现故障,然后检查 sqlmesh.lsp.main 以及项目中关于 lsprotocol 和 pygls 的依赖声明。使用受支持的依赖版本时,SQLMesh 语言服务器能够启动且不出现报告的导入错误,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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
.venvas workspace interpreter)
Steps to reproduce
- Install current
tcloudin a clean venv (e.g.pip install tcloud). - Open a SQLMesh project and use that venv as the Python interpreter.
- 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
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SQLMesh/sqlmesh 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
SQLMesh/sqlmesh#6008 · 1 条评论 ·
维护者通常 4 天内回复
-
Improvement
难度 1/5 1 小时以内 新手友好度 85/100
SQLMesh/sqlmesh#5696 · 6 条评论 ·
维护者通常 4 天内回复
-
Support pg_lake未关闭Feature Improvement
难度 2/5 1-3 小时 新手友好度 70/100
SQLMesh/sqlmesh#5669 · 1 条评论 ·
维护者通常 4 天内回复
相似的 Issue
-
accepted
难度 2/5 1-3 小时 新手友好度 67/100
future-agi/future-agi#5274 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
GenericMappingTools/pygmt#5014 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
w3c/feedvalidator#204 ·
-
[BUG][Low–Medium] founder_numbers.py silently reads a SAFE discount or pool target given as a fraction (0.2) as 0.2%可能已有人在做 @sumitkhond111-del 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 72/100
bmad-code-org/BMAD-METHOD#3358 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
open-mmlab/mmcv#3352 ·