Skip to content

"[DEP0132] DeprecationWarning" warnings in the current main.js #27

@weirdgiraffe

Description

@weirdgiraffe

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:

- 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())})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions