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

Use different psalm cache for different error levels #6251

Merged
merged 1 commit into from Aug 8, 2021

Conversation

TysonAndre
Copy link
Contributor

Fixes #4952

src/Psalm/Config.php Outdated Show resolved Hide resolved
*/
public function computeHash(): string
{
return sha1($this->hash . ':' . $this->level);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw a wrong reuse of the cache between a partial analysis of a single file and a full run where errors due to lack of context on the first partial run was reported on the full run. Shouldn't we use a hash that is composer.lock + psalm.xml + command line to be safe?

@weirdan weirdan merged commit 2431d16 into vimeo:master Aug 8, 2021
@weirdan
Copy link
Collaborator

weirdan commented Aug 8, 2021

Thanks!

@TysonAndre TysonAndre deleted the reset-cache-level branch September 6, 2021 17:31
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

Successfully merging this pull request may close these issues.

Psalm should reset the cache when changing the error level.
3 participants