Skip to content
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

Issues report depends on --threads #9083

Open
SCIF opened this issue Jan 8, 2023 · 4 comments
Open

Issues report depends on --threads #9083

SCIF opened this issue Jan 8, 2023 · 4 comments

Comments

@SCIF
Copy link
Contributor

SCIF commented Jan 8, 2023

Just got different results using v5.4.0:

php ./vendor/bin/psalm --no-cache --threads=1:

------------------------------
                              
       No errors found!       
                              
------------------------------
3236 other issues found.

php ./vendor/bin/psalm --no-cache --threads=2:

------------------------------
1 errors found
------------------------------
3241 other issues found.

php ./vendor/bin/psalm --no-cache --threads=4:

------------------------------
1 errors found
------------------------------
3243 other issues found.

A few observations:

  1. Total issue counter differs for 2 and 4 threads. But it differs exactly for the number of threads (3243-3241=2, 4-2=2)
  2. The error found by psalm was a deprecation notice present in the file 8 times, but in baseline file it was just 7 occurances of them. Looks like multithreaded run shows more correct results (which is weird and not expected tbh)

The text of an issue shown in the report:

ERROR: DeprecatedClass - app/Repository/MyModelRepository.php:160:16 - Class App\Models\MyModel is marked as deprecated (see https://psalm.dev/098)
     * @return Collection<array-key, MyModel>
@psalm-github-bot
Copy link

Hey @SCIF, can you reproduce the issue on https://psalm.dev ?

@SCIF
Copy link
Contributor Author

SCIF commented Jan 8, 2023

Ok, something weird is continue to happen. I ran --threads=4 --update-baseline and then --threads=1 shows me issues which appear for threads<4 runs.

@orklah
Copy link
Collaborator

orklah commented Feb 5, 2025

Could you check again? There have been work related to threads that could have resolved the issue

@SCIF
Copy link
Contributor Author

SCIF commented Feb 6, 2025

Could you check again? There have been work related to threads that could have resolved the issue

I'll leave the message here once will test and make sure current behavior is correct. For now psalm shows too much warnings on our codebase so we are in process of figuring out what's happening. Give us a week or so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants