New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Psalm Breaks On Syntax Error #142
Comments
Thanks for the report. This is actually an error with upstream vimeo/psalm so you'd need to report the error there in the future. This project merely interfaces with Vimeo/psalm. Regardless it's already been fixed as of two days ago (by me). It just hasn't been released yet. |
Ref: vimeo/psalm#7368 |
Hey 👋 Thanks for the heads-up! I wonder about the last part of the error logs. It seems that the extension does not gracefully exits when VS Code crashes/deactivates it? Could, of course, be a VS Code issue again. I see a lot of callbacks in the stack trace. |
In vscode main after a language server crashes more than 5 times in the span of 3 minutes then vscode will abort the running of the extension. This is to protect the stability of vscode and the host system I've been trying to go through psalms language server and just try catching most places where this crashes because in the end the language server should almost never crash |
With the next version of Psalm then hopefully even less :) Thanks for fixing. |
Summary
The psalm extension breaks when there is a syntax error (e.g. missing closing
}
).Steps to Reproduce
$ symfony new .
maker-bundle
in order to create Controller stub using$ composer require --dev maker
,$ composer require doctrine/annotations
,$ php bin/console make:controller GrumpyPopsicleController
The generated class looks as follows:
}
on the second to last row, matching theGrumpyPopsicleController::index
method.Unclosed '{' on line 10
}
token, save, remove it again, save.Syntax error, unexpected EOF on line 20 (Psalmhttps://psalm.dev/173)
andUnclosed '{' on line 10
}
braceInterestingly, after Psalm crashed, you can still add/remove the
}
and save accordingly, and the original error message is shown/hidden.Unclosed '{' on line 10
.The text was updated successfully, but these errors were encountered: