github / github/copilot-language-server-release
"[DEP0132] DeprecationWarning" warnings in the current main.js
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 290
- Fork
- 24
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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())})
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia in main.js dalla chiamata di terminazione del worker mostrata nell'issue. Aggiorna quella chiamata come descritto, quindi esegui il server del linguaggio o i controlli disponibili e conferma che gli avvisi DEP0132 non compaiano più nei log LSP.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 35/100