Skip to content

[stable20] Update psalm baseline - #29299

Closed
PVince81 wants to merge 4 commits into
stable20from
techdebt/update-baseline/stable20
Closed

[stable20] Update psalm baseline#29299
PVince81 wants to merge 4 commits into
stable20from
techdebt/update-baseline/stable20

Conversation

@PVince81

Copy link
Copy Markdown
Member

No description provided.

@PVince81PVince81 added the 3. to review Waiting for reviews label Oct 18, 2021
@PVince81PVince81 self-assigned this Oct 18, 2021
@PVince81
PVince81 requested review from a team, nickvergessen and skjnldsv and removed request for a teamOctober 18, 2021 14:14
@skjnldsv

Copy link
Copy Markdown
Member

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

@skjnldsvskjnldsv added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Oct 19, 2021
@PVince81

Copy link
Copy Markdown
MemberAuthor

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

@PVince81

Copy link
Copy Markdown
MemberAuthor
% 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
Copy Markdown
MemberAuthor

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

@skjnldsv

Copy link
Copy Markdown
Member

Ask Christoph?

@kesselb

kesselb commented Oct 22, 2021

Copy link
Copy Markdown
Contributor

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 <vincent@nextcloud.com>
@MichaIng
MichaIngforce-pushed the techdebt/update-baseline/stable20 branch from f0a11c4 to 8984263CompareOctober 23, 2021 18:16
@skjnldsv

Copy link
Copy Markdown
Member

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

@PVince81

Copy link
Copy Markdown
MemberAuthor

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

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81

Copy link
Copy Markdown
MemberAuthor

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
Copy Markdown
MemberAuthor

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

@ChristophWurstChristophWurst changed the title Update psalm baseline[stable20] Update psalm baselineOct 25, 2021
@ChristophWurst

Copy link
Copy Markdown
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
Copy Markdown
Member

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

Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen

Copy link
Copy Markdown
Member

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

@blizzzblizzz mentioned this pull request Nov 3, 2021
15 tasks
@MichaIngMichaIng removed this from the Nextcloud 20.0.14 milestone Nov 6, 2021
@PVince81PVince81 removed their assignment Nov 10, 2021
@PVince81

Copy link
Copy Markdown
MemberAuthor

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

@blizzz

Copy link
Copy Markdown
Member

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)

@blizzzblizzz closed this Nov 10, 2021
@MichaIng
MichaIng deleted the techdebt/update-baseline/stable20 branch December 21, 2021 01:16
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developingWork in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@PVince81@skjnldsv@kesselb@ChristophWurst@nickvergessen@blizzz@MichaIng