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

[stable20] Update psalm baseline #29299

Closed
wants to merge 4 commits into from

Conversation

PVince81
Copy link
Member

No description provided.

@PVince81 PVince81 added the 3. to review Waiting for reviews label Oct 18, 2021
@PVince81 PVince81 requested a review from CarlSchwan October 18, 2021 14:13
@PVince81 PVince81 self-assigned this Oct 18, 2021
@PVince81 PVince81 requested review from a team, nickvergessen and skjnldsv and removed request for a team October 18, 2021 14:14
@skjnldsv
Copy link
Member

**Static code analysis / static-code-analysis (pull_request) ** Failing after 1m — static-code-analysis

@skjnldsv skjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 19, 2021
@PVince81
Copy link
Member Author

yes, I'm trying to rebuild but it keeps on crashing locally...

@PVince81
Copy link
Member Author

% COMPOSER_PROCESS_TIMEOUT=3600 php build/composer.phar run psalm -- --threads=1 --no-cache --update-baseline
> psalm '--threads=1' '--no-cache' '--update-baseline'
Scanning files...
Analyzing files...

Uncaught InvalidArgumentException: Could not get class storage for horde_imap_client in /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Provider/ClassLikeStorageProvider.php:45
Stack trace:
#0 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/ClassLikes.php(1561): Psalm\Internal\Provider\ClassLikeStorageProvider->get()
#1 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/ClassLikes.php(1795): Psalm\Internal\Codebase\ClassLikes->getConstantForClass()
#2 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/ClassLikes.php(1771): Psalm\Internal\Codebase\ClassLikes->resolveConstantType()
#3 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/ClassLikes.php(1771): Psalm\Internal\Codebase\ClassLikes->resolveConstantType()
#4 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/ClassLikes.php(1596): Psalm\Internal\Codebase\ClassLikes->resolveConstantType()
#5 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Type/SimpleAssertionReconciler.php(1390): Psalm\Internal\Codebase\ClassLikes->getConstantForClass()
#6 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Type/SimpleAssertionReconciler.php(110): Psalm\Internal\Type\SimpleAssertionReconciler::reconcileInArray()
#7 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Type/AssertionReconciler.php(150): Psalm\Internal\Type\SimpleAssertionReconciler::reconcile()
#8 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Type/Reconciler.php(290): Psalm\Internal\Type\AssertionReconciler::reconcile()
#9 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php(262): Psalm\Type\Reconciler::reconcileKeyedTypes()
#10 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php(448): Psalm\Internal\Analyzer\Statements\Block\IfAnalyzer::analyze()
#11 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php(169): Psalm\Internal\Analyzer\StatementsAnalyzer::analyzeStatement()
#12 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Block/SwitchCaseAnalyzer.php(414): Psalm\Internal\Analyzer\StatementsAnalyzer->analyze()
#13 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/Statements/Block/SwitchAnalyzer.php(118): Psalm\Internal\Analyzer\Statements\Block\SwitchCaseAnalyzer::analyze()
#14 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php(480): Psalm\Internal\Analyzer\Statements\Block\SwitchAnalyzer::analyze()
#15 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php(169): Psalm\Internal\Analyzer\StatementsAnalyzer::analyzeStatement()
#16 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php(597): Psalm\Internal\Analyzer\StatementsAnalyzer->analyze()
#17 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/ClassAnalyzer.php(1919): Psalm\Internal\Analyzer\FunctionLikeAnalyzer->analyze()
#18 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/ClassAnalyzer.php(748): Psalm\Internal\Analyzer\ClassAnalyzer->analyzeClassMethod()
#19 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/FileAnalyzer.php(221): Psalm\Internal\Analyzer\ClassAnalyzer->analyze()
#20 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/Analyzer.php(357): Psalm\Internal\Analyzer\FileAnalyzer->analyze()
#21 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/Analyzer.php(597): Psalm\Internal\Codebase\Analyzer->Psalm\Internal\Codebase\{closure}()
#22 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Codebase/Analyzer.php(283): Psalm\Internal\Codebase\Analyzer->doAnalysis()
#23 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/Psalm/Internal/Analyzer/ProjectAnalyzer.php(648): Psalm\Internal\Codebase\Analyzer->analyzeFiles()
#24 /srv/www/htdocs/server/lib/composer/vimeo/psalm/src/psalm.php(680): Psalm\Internal\Analyzer\ProjectAnalyzer->check()
#25 /srv/www/htdocs/server/lib/composer/vimeo/psalm/psalm(2): require_once('/srv/www/htdocs...')
#26 {main}
(Psalm 3.15@de6e7f324f44dde540ebe7ebd4eb481b97c86f30 crashed due to an uncaught Throwable)
Script psalm handling the psalm event returned with error code 1

either I need to use docker, or we enable the bot here ?

@PVince81
Copy link
Member Author

psalm works fine for me on master, so probably it's the psalm version specific to this branch or something...

@skjnldsv
Copy link
Member

Ask Christoph?

@kesselb
Copy link
Contributor

kesselb commented Oct 22, 2021

Hey @PVince81, thanks for updating the psalm baseline for 20 👍

Could not get class storage for horde_imap_client

horde_imap_client is a dependency for mail app. The psalm configuration for stable20 scans all folders in apps. #29396 should help.

Signed-off-by: Vincent Petry <[email protected]>
@MichaIng MichaIng force-pushed the techdebt/update-baseline/stable20 branch from f0a11c4 to 8984263 Compare October 23, 2021 18:16
@skjnldsv
Copy link
Member

@ChristophWurst you paslm master, what's wrong :p

@PVince81
Copy link
Member Author

Hey @PVince81, thanks for updating the psalm baseline for 20 +1

Could not get class storage for horde_imap_client

horde_imap_client is a dependency for mail app. The psalm configuration for stable20 scans all folders in apps. #29396 should help.

alright, I'll try with a clean checkout with no apps

@PVince81
Copy link
Member Author

this was the command I used on a clean checkout for that last commit:
php build/composer.phar run psalm -- --threads=1 --no-cache --update-baseline

after a composer install with composer 1.10.23

I don't know what psalm wants from me... Now it seems the list of errors is even looooooooonger than before

@PVince81
Copy link
Member Author

@ChristophWurst to the rescue ? if you manage to fix it please explain the magic formula

@ChristophWurst ChristophWurst changed the title Update psalm baseline [stable20] Update psalm baseline Oct 25, 2021
@ChristophWurst
Copy link
Member

php build/composer.phar run psalm -- --threads=1 --no-cache --update-baseline

add --set-baseline=<path to baseline file> and try again. IIRC you need both options

@ChristophWurst
Copy link
Member

I'm unable to run it myself because stable20 doesn't work with php8 :/

Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen
Copy link
Member

Pushed the script part from master and ran it.
Execution doesn't look good thou.

@PVince81
Copy link
Member Author

I'm giving up on this, feel free to take over or close, especially considering that NC 20 reached EOL

@blizzz
Copy link
Member

blizzz commented Nov 10, 2021

I'm giving up on this, feel free to take over or close, especially considering that NC 20 reached EOL

closing therefore (fwiw can re reopened)

@blizzz blizzz closed this Nov 10, 2021
@MichaIng MichaIng deleted the techdebt/update-baseline/stable20 branch December 21, 2021 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants