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

Psalm reports errors on GitHub Actions but not locally #4464

Closed
sebastianbergmann opened this issue Oct 31, 2020 · 6 comments
Closed

Psalm reports errors on GitHub Actions but not locally #4464

sebastianbergmann opened this issue Oct 31, 2020 · 6 comments
Labels

Comments

@sebastianbergmann
Copy link
Contributor

Not sure whether this is a bug in Psalm but I am observing this weird behaviour right now:

When I run Psalm on https://github.com/sebastianbergmann/comparator locally then I get:

$ ./tools/psalm --config=.psalm/config.xml
Scanning files...
Analyzing files...

░░░░░░░░░░░░░░░░░

------------------------------
No errors found!
------------------------------
45 other issues found.
You can display them with --show-info=true
------------------------------
Psalm can automatically fix 16 of these issues.
Run Psalm again with 
--alter --issues=MissingReturnType,MissingParamType --dry-run
to see what it can fix.
------------------------------

Checks took 0.64 seconds and used 50.479MB of memory
Psalm was able to infer types for 90.9707% of the codebase

When the same version of Psalm (with the same configuration and baseline) is run on the same code on GitHub Actions then I get:

.
.
.
------------------------------
24 errors found
------------------------------
33 other issues found.
You can display them with --show-info=true

See https://github.com/sebastianbergmann/comparator/runs/1335576035?check_suite_focus=true for details.

This started happening after the update to Psalm 4.1.0 and only seems to affect PropertyNotSetInConstructor issues that are ignored by the baseline.

@psalm-github-bot
Copy link

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

@davidbyoung
Copy link

I also have this issue. FWIW if you switch your required version to dev-master, you'll get the latest commit, which appears to work correctly. Pulling in ^4.1@dev pulls in this commit, which seems to be broken.

@sebastianbergmann
Copy link
Contributor Author

That does not explain the difference in behaviour locally vs. GitHub Actions I described.

@davidbyoung
Copy link

psalm.dev is using dev-master (latest commit) whereas the latest 4.1 release isn't the latest commit. Do you know which version/commit you're using in GitHub Actions?

@muglug muglug added the bug label Nov 1, 2020
@muglug
Copy link
Collaborator

muglug commented Nov 1, 2020

@davidbyoung I think you're chasing up the wrong tree, something is definitely a little broken but I'm not sure where.

@muglug
Copy link
Collaborator

muglug commented Nov 1, 2020

OH @sebastianbergmann I think I know what's happening. Psalm uses the composer lockfile to figure out whether its version has changed, and then to bust cache, but you're short-circuiting that by using the Phar.

@muglug muglug closed this as completed in 6672204 Nov 1, 2020
danog pushed a commit to danog/psalm that referenced this issue Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants