Closed Rizky92 closed 5 months ago
Please try running with Psalm 5.
Also, depending on the codebase it may not be surprising for Psalm to consume that much
Thank you for the reply. I'll try if it works with psalm 5. The error occured when developing for production codebase and We couldn't bump laravel just yet.
Regarding memory usage, on typical linting psalm consumes ~1G. The process stuck on that particular model that has the trait, which leads me to believe some error happening in the trait.
Hey @Rizky92 what is the laravel plugin version you use? in v2.6.0 we fixed a major issue that leaded to high memory consumption. This plugin version works with Laravel ^9.2: https://github.com/psalm/psalm-plugin-laravel/blob/v2.6.0/composer.json#L18 , but please let composer to install the most suitable version for your project.
UPD:
psalm/plugin-laravel v1.6.2
I see, you use v1.6.2. Can you please update both Psalm and plugin versions, as @orklah recommended?
Hey @Rizky92
Can you please try to use 1.x
branch of the package?
like:
"psalm/plugin-laravel": "dev-1.x as v1.6.3"
I just applied the same performance fix as I did on the master branch - it should have a noticeable positive impact to the memory consumption. If it works ok, I'll release it as v1.6.3. Thank you in advance!
UPD: the fix is released as v1.6.3. Please ping me here if something is broken on this version.
Describe the bug Psalm stuck on analyzing a model that contains
HasRecursiveRelationships
trait fromstaudenmeir/laravel-adjacency-list
which caused exhausted memory usage. I've set hard limit on my usage up to 2G.Impacted Versions
Additional context No known additional contexts, however I can provide more if needed.