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 errors on the psalm@master repo when --threads < 4 #10342

Closed
robchett opened this issue Nov 2, 2023 · 2 comments
Closed

Psalm errors on the psalm@master repo when --threads < 4 #10342

robchett opened this issue Nov 2, 2023 · 2 comments

Comments

@robchett
Copy link
Contributor

robchett commented Nov 2, 2023

@danog

Tracked back to 1745c83, via bisect. Since then when threads is <=4 then the following errors are reported.

Error: tests/Config/PluginListTest.php:33:25: InvalidPropertyAssignmentValue: $this->config with declared type 'never' cannot be assigned type 'Mockery\MockInterface&Psalm\Config' (see https://psalm.dev/145)
Error: tests/Config/PluginListTest.php:36:30: InvalidPropertyAssignmentValue: $this->config_file with declared type 'never' cannot be assigned type 'Mockery\MockInterface&Psalm\Internal\PluginManager\ConfigFile' (see https://psalm.dev/145)
Error: tests/Config/PluginListTest.php:48:24: MixedMethodCall: Cannot determine the type of $this->config when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:48:35: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:48:55: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:53:[39](https://github.com/vimeo/psalm/actions/runs/6737994602/job/18316613999?pr=10341#step:5:40): NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:66:24: MixedMethodCall: Cannot determine the type of $this->config when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:66:35: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:66:55: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:75:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:87:24: MixedMethodCall: Cannot determine the type of $this->config when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:87:35: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:87:55: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:95:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:107:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:120:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:146:24: MixedMethodCall: Cannot determine the type of $this->config when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:146:35: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:146:55: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:150:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:160:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:171:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:173:29: MixedMethodCall: Cannot determine the type of $this->config_file when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:173:[40](https://github.com/vimeo/psalm/actions/runs/6737994602/job/18316613999?pr=10341#step:5:41): MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:183:39: NoValue: All possible types for this argument were invalidated - This may be dead code (see https://psalm.dev/179)
Error: tests/Config/PluginListTest.php:185:29: MixedMethodCall: Cannot determine the type of $this->config_file when calling method expects (see https://psalm.dev/015)
Error: tests/Config/PluginListTest.php:185:40: MixedMethodCall: Cannot determine the type of the object on the left hand side of this expression (see https://psalm.dev/015)

Removing final from ComposerLock fixes the issue but the reason isn't clear to me as to why and why it only does it with fewer threads.

Copy link

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

robchett added a commit to robchett/psalm that referenced this issue Nov 3, 2023
@weirdan
Copy link
Collaborator

weirdan commented Feb 10, 2024

Fixed (kinda) in #10343

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