WP CLI extract command takes ages, eats CPU and fails
-
I was trying to extract strings for Jetpack by running
> wp loco extract plugins:jetpack/jetpack.phpI see a bunch of PHP warnings about
preg_match()regex being too long in the output:Warning: preg_match(): Compilation failed: regular expression is too large at offset 57961 in ../wp-content/plugins/loco-translate/lib/compiled/gettext.php:269
Stack trace:
#1 ../wp-content/plugins/loco-translate/lib/compiled/gettext.php(269): preg_match
#2 ../wp-content/plugins/loco-translate/lib/compiled/gettext.php(267): LocoExtracted->mergeField
#3 ../wp-content/plugins/loco-translate/lib/compiled/gettext.php(284): LocoExtracted->pushEntry
#4 ../wp-content/plugins/loco-translate/lib/compiled/gettext.php(324): LocoExtractor->push
#5 ../wp-content/plugins/loco-translate/lib/compiled/gettext.php(259): LocoPHPExtractor->extract
#6 ../wp-content/plugins/loco-translate/src/gettext/Extraction.php(122): LocoExtracted->extractSource
#7 ../wp-content/plugins/loco-translate/src/cli/ExtractCommand.php(39): Loco_gettext_Extraction->addProject
#8 ../wp-content/plugins/loco-translate/src/cli/Commands.php(83): Loco_cli_ExtractCommand::run
#9 php_native(0): Loco_cli_Commands->extract
#10 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func
#11 php_native(0): WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}
#12 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(497): call_user_func
#13 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(470): WP_CLI\Dispatcher\Subcommand->invoke
#14 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(493): WP_CLI\Runner->run_command
#15 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1295): WP_CLI\Runner->run_command_and_exit
#16 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start
#17 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(84): WP_CLI\Bootstrap\LaunchRunner->process
#18 phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap
#19 phar:/usr/local/bin/wp/php/boot-phar.php(20): include('phar:/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php')
#20 /usr/local/bin/wp(4): include('phar:/usr/local/bin/wp/php/boot-phar.php')After about twelve minutes I hit Ctrl+C to cancel the process. Something doesn’t seem right here.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.