action #99678
closedSpeedup tidy
Description
Motivation¶
perltidy is used in multiple projects, e.g. os-autoinst, openQA and os-autoinst-distri-opensuse. In os-autoinst for me it takes already 22s for a noop, for os-autoinst-distri-opensuse considerably longer. Would be great if we can improve that. https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall sounds like a good approach as it has a local file signature cache that sounds promising. But when I ran it locally on os-autoinst it changed the copyright character and eventually failed with
Wide character in print at /usr/lib/perl5/vendor_perl/5.26.1/Path/Tiny.pm line 537.
Wide character in subroutine entry at /usr/lib/perl5/vendor_perl/5.26.1/Code/TidyAll/CacheModel.pm line 125.
Acceptance criteria¶
- AC1: A noop run of tidy is considerably quicker in os-autoinst-distri-opensuse
- AC2: The same solution is applied for os-autoinst+openQA+os-autoinst-distri-opensuse
Suggestions¶
- Try to run https://metacpan.org/dist/Code-TidyAll/view/bin/tidyall on os-autoinst, fix any problems, add config to exclude copyright comments or just change the comments accordingly, then integrate into build system and adapt the same for openQA and os-autoinst-distri-opensuse
- If possible also use Code::TidyAll for testing, e.g. follow https://perlmaven.com/run-perl-tidy-to-beautify-the-code
Updated by okurz about 3 years ago
- Assignee set to okurz
- Priority changed from Normal to Low
Updated by okurz over 2 years ago
- Status changed from New to Feedback
- Target version changed from future to Ready
Updated by okurz over 2 years ago
- Status changed from Feedback to In Progress
CI tests fail due to missing dependency. Did
for i in perl-List-Compare perl-Specio-Library-Path-Tiny perl-lib-relative perl-Code-TidyAll; do osc sr -m "Dependency of perl-Code-TidyAll for use in os-autoinst" openSUSE:Factory $i openSUSE:Backports:SLE-15-SP4 && osc linkpac openSUSE:Factory $i devel:openQA:Leap:15.3; done
to add the perl package 'Code::TidyAll' for our repos and for future support in Leap.
Updated by okurz over 2 years ago
- Status changed from In Progress to Feedback
All packages have been accepted, both PRs https://github.com/os-autoinst/os-autoinst/pull/1795 https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/14017 waiting for review
Updated by okurz over 2 years ago
Both PRs merged. Preparing an equivalent change for openQA: https://github.com/os-autoinst/openQA/pull/4468
Updated by okurz over 2 years ago
https://github.com/os-autoinst/openQA/pull/4468 merged but now we are not covering all scripts. Updated https://github.com/os-autoinst/openQA/pull/4485
Updated by okurz over 2 years ago
- Status changed from Feedback to Resolved
https://github.com/os-autoinst/openQA/pull/4485 merged. All ACs covered.