github / github/copilot-language-server-release
"[DEP0132] DeprecationWarning" warnings in the current main.js
- 主要语言
- 没有语言数据
- 星标
- 290
- 派生
- 24
- PR 合并指标
- 30 天内没有已合并 PR
描述
I'm using neovim with copilot. Current code of language server spam my logs with an annoying depreciation warnings in LSP logs (I'm using the copilot.lua though):
```
[ERROR][2025-07-04 16:10:21] ...p/_transport.lua:36 "rpc" "node" "stderr" "(node:32377) [DEP0132] DeprecationWarning: Passing a callback to worker.terminate() is deprecated. It returns a Promise instead.\n(node:32377) [DEP0132] DeprecationWarning: Passing a callback to worker.terminate() is deprecated. It returns a Promise instead.\n(node:32377) [DEP0132] DeprecationWarning: Passing a callback to worker.terminate() is deprecated. It returns a Promise instead.\n(node:32377) [DEP0132] DeprecationWarning: Passing a callback to worker.terminate() is deprecated. It returns a Promise instead.\n"
```
The could be easily fixed if we replace this piece of code in `main.js`:
```diff
- this.workers[i].worker.terminate(()=>{n++,n===this.workers.length&&(this.workers=[],r())})
+ this.workers[i].worker.terminate().then(()=>{n++,n===this.workers.length&&(this.workers=[],r())})
```
贡献指南
调研方向
从 main.js 中 issue 所示的 worker 终止调用开始。按描述更新该调用,然后运行语言服务器或可用的检查,并确认 DEP0132 警告不再出现在 LSP 日志中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, node.js
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100