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

Uncaught Throwable somewhere in ConcatAnalyzer.php #9355

Closed
ciaranmcnulty opened this issue Feb 20, 2023 · 5 comments
Closed

Uncaught Throwable somewhere in ConcatAnalyzer.php #9355

ciaranmcnulty opened this issue Feb 20, 2023 · 5 comments

Comments

@ciaranmcnulty
Copy link
Contributor

This line appears to be breaking Psalm for me:
$jsons = glob(__DIR__ . '/../acceptance/**/*.json');

I can't reproduce on psalm.dev but I was able to chop the class down to just that line in a method

I get:

Uncaught AssertionError: assert(count($result_type_parts) === $combinations) in /Users/ciaranmcnulty/Code/dockerfile/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php:181
Stack trace:
#0 /Users/ciaranmcnulty/Code/dockerfile/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/ConcatAnalyzer.php(181): assert(false, 'assert(count($r...')
#1 /Users/ciaranmcnulty/Code/dockerfile/vendor/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php(138): Psalm\Internal\Analyzer\Statements\Expression\BinaryOp\ConcatAnalyzer::analyze(Object(Psalm\Internal\Analyzer\StatementsAnalyzer), Object(PhpParser\Node\Scalar\MagicConst\Dir), Object(PhpParser\Node\Scalar\String_), Object(Psalm\Context), Object(Psalm\Type\Union))

This is with:
Psalm dev-master@589fee7b224f4ccb7c878aa3781c38c3a7dbea0a

@ciaranmcnulty ciaranmcnulty changed the title Uncaught Throwable somewhere in Uncaught Throwable somewhere in ConcatAnalyzer.php Feb 20, 2023
@weirdan
Copy link
Collaborator

weirdan commented Feb 20, 2023

Fixed in #9351
The fix is released in 5.7.2.

@weirdan weirdan closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2023
@ciaranmcnulty
Copy link
Contributor Author

@weirdan I've tried just now with Psalm 5.7.2@9e0dd5ab59498aa3f531bd359bc93dac671c5938 and same error is occurring

@ciaranmcnulty
Copy link
Contributor Author

Disabling opcache fixed it for me though

@weirdan weirdan reopened this Feb 20, 2023
@weirdan
Copy link
Collaborator

weirdan commented Feb 20, 2023

@ciaranmcnulty can you post the error message you're getting on 5.7.2, including backtrace?

@ciaranmcnulty
Copy link
Contributor Author

I can no longer reproduce now it's successfully run. I'll re-open if it reoccurs

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