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

Wrong errors after second run with cache #7681

Open
ilyaplot opened this issue Feb 16, 2022 · 5 comments
Open

Wrong errors after second run with cache #7681

ilyaplot opened this issue Feb 16, 2022 · 5 comments

Comments

@ilyaplot
Copy link

When I run psalm with cached results after editing any file I see UndefinedClass, UndefinedDocblockClass and other errors.
This bug reproduced in all my projects on Yii2 framework.

Psalm version is 4.20.0, yii2 framework, php 7.4.

Demonstration: https://www.loom.com/share/aea22198e3374afeaf57f175a9c877dd

My psalm.xml:

 <psalm
        errorLevel="5"
        resolveFromConfigFile="true"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="https://getpsalm.org/schema/config"
        xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
>
    <projectFiles>
        <directory name="./"/>
        <ignoreFiles>
            <directory name="backend/runtime"/>
            <directory name="console/runtime"/>
            <directory name="console/migrations"/>
            <directory name="console/controllers"/>
            <directory name="vendor"/>
            <directory name="environments"/>
            <file name="requirements.php"/>
        </ignoreFiles>
    </projectFiles>
    <ignoreExceptions>
        <class name="yii\web\HttpException"/>
        <class name="yii\web\NotFoundHttpException"/>
        <class name="yii\web\BadRequestHttpException"/>
        <class name="yii\web\ForbiddenHttpException"/>
    </ignoreExceptions>
</psalm>
@psalm-github-bot
Copy link

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

@orklah
Copy link
Collaborator

orklah commented Feb 16, 2022

could you try running with --no-diff ?

@ilyaplot
Copy link
Author

@orklah if run with --no-diff then everything is ok, no errors.

@davidbyoung
Copy link

I'm also getting this issue on my project. --no-diff does seem to resolve the issue.

@christianlupus
Copy link

I have the same issue where --no-diff seems to help. I checked with 4.30 and 5.12. Both seem to be affected.

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

No branches or pull requests

4 participants