Open shadowwa opened 2 years ago
That's weird
There's a few of your points that can be explained though.
First, note that you're running an analysis against your plugin (while enabling that plugin). That's quite unusual but it shouldn't lead to a crash. Second, the file where the crash happens is the class dedicated to edit docblocks. That makes sense that if you remove the cause of the issue that lead to Psalm editing a docblock, the crash disappears (for example, when you remove the parameter given you're running MissingParamType). Third, the particular line that crashes is https://github.com/vimeo/psalm/blob/e3f46d9a3cb3eb3932e8a48a4c9bd6156a4494ba/src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php#L169 It's a line that tries to locate the function by searching the closing bracket after the parameters.
My guess is that we're in an edge case, possibly caused by some wrong assumption by Psalm when calculating positions
Could you try debugging this to see what's going on in there?
here are the debug output, I also tried to see if there was a difference between a psalm installed globaly on in the project, but the crash occured in both cases.
Hello,
I got a puzzling crash on my project when using:
I was able to simplify to code to obtain the test files include in the zip. the puzzling part come from the bug seems to depends of the filesize and the code:
test-psalm.zip