vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.51k stars 656 forks source link

[LSP] Method Psalm\Internal\LanguageServer\LanguageServer::cancelRequest() does not exist #10915

Open mathroc opened 3 months ago

mathroc commented 3 months ago

Hi!

I saw this error in the vscode extension for Psalm, from what I understood it's not really an error. But something that an LSP client is trying to use that is not implemented.

So just posting this in case you think it's worth implementing.

I'm also not sure if it's something that shouldn't even be called according to the capabilities declared by the Psalm language server or not. (cc @tm1000)

psalm-github-bot[bot] commented 3 months ago

Hey @mathroc, can you reproduce the issue on https://psalm.dev? These will be used as phpunit tests when implementing the feature or fixing this bug.

tm1000 commented 2 months ago

It's fine that it's called it just that in the world of Psalm there's nothing that can be canceled because the file parsers aren't async. Essentially you are saying "stop doing that thing" but by the time it actually does that the blocking action has already finished. I suppose that could be changed if the FileProvider is changed to async using ampphp but it's something that I think needs to wait until higher PHP 8.x is supported by Psalm itself.

Anyways not a bad thing to keep this open because we could just create a no-op and stop spamming the logs