-
Notifications
You must be signed in to change notification settings - Fork 660
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 fails when processing more than 512 files when using intersection types #8387
Comments
Hey @joaojacome, can you reproduce the issue on https://psalm.dev ? |
Thanks for the reproducer, that backtrace should be helpful. |
@joaojacome would you mind triggering the GHA build again? The logs have since expired. |
@weirdan I've triggered it now. |
Seems like 4.26 fails directly do to missing support for intersections. the beta seems to be consistent with dev-master. dev-master fails for : It seems do to so independently from the number of files but I'm not sure I see what intersection it complains about |
Looking at those runs, beta (and only that version) does emit tons of |
And it's likely because it switched to multithreaded scan here: psalm/src/Psalm/Internal/Codebase/Scanner.php Lines 334 to 352 in a157743
|
I've had a look at this problem (we're running into this problem consistently at my company). I've not been able to create a fix, but here is my analysis of the problem: I've worked with a minimal analysis available at https://github.com/annervisser/psalm-512-files-error-repro which I'll use as example. The code looks like this: <?php // Bar.php
namespace App;
class Bar
{
public Foo&Bar $prop3;
} <?php // Foo.php
namespace App;
class Foo
{
public Foo&Bar $prop3;
} Analysis
Possible solution
Footnotes
|
It certainly is. Even in a single-threaded scan, we may encounter |
We've got the same problem in our project. This basically prevents one from using intersection types. |
Hello!
I've been having some failures with Psalm in a project, and looks like Psalm is failing when there's more than 512 files being analysed, whenever it runs with more than 1 thread.
At first I thought it could've been something in my local env, but after some tries, I managed to reproduce it in a totally separated environment.
Affected versions
Couldn't reproduce it on master due to another issue.
How to reproduce
I've created this repo here, and I've added a github action to reproduce it:
https://github.com/joaojacome/psalm-test
The text was updated successfully, but these errors were encountered: