diff --git a/src/Analysis/Problem/Forge/ModDependencyProblem.php b/src/Analysis/Problem/Forge/ModDependencyProblem.php index c5ab4d81..dbca183b 100644 --- a/src/Analysis/Problem/Forge/ModDependencyProblem.php +++ b/src/Analysis/Problem/Forge/ModDependencyProblem.php @@ -36,7 +36,8 @@ public static function getPatterns(): array 'requires-mods' => '/The mod \S+ \(([^\)]+)\) requires mods \[([^\]]+)\] to be available/', 'missing-mods-exception' => '/net\.minecraftforge\.fml\.common\.MissingModsException: Mod \S+ \((.+)\) requires (.+)/', 'mod-loading-exception' => '/net\.minecraftforge\.fml\.ModLoadingException: Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./', - 'loading-failed-exception' => '/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*\n)*Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./' + // whole lines are skipped possessively, so a long stack trace doesn't exhaust the backtrack limit + 'loading-failed-exception' => '/net\.minecraftforge\.fml\.LoadingFailedException: Loading errors encountered: \[\n(?:.*+\n)*Mod §.([^§]+)§. requires §.([^§]+)§. §.([^ §]+)[^§]*§./' ]; } diff --git a/test/tests/Performance/PatternSafetyTest.php b/test/tests/Performance/PatternSafetyTest.php index 94f26ba5..ab972676 100644 --- a/test/tests/Performance/PatternSafetyTest.php +++ b/test/tests/Performance/PatternSafetyTest.php @@ -3,6 +3,10 @@ namespace Aternos\Codex\Minecraft\Test\Performance; use Aternos\Codex\Analysis\PatternInsightInterface; +use Aternos\Codex\Minecraft\Analysis\Problem\Bukkit\ChunkLoadExceptionProblem; +use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ClientOnlyModProblem; +use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModFatalProblem; +use Aternos\Codex\Minecraft\Analysis\Problem\Paper\ServerJarInPluginFolderProblem; use Aternos\Codex\Minecraft\Analysis\Problem\Forge\ModDependencyProblem; use Aternos\Codex\Minecraft\Test\Logs\TestLog; use FilesystemIterator; @@ -72,7 +76,6 @@ class PatternSafetyTest extends TestCase * Which of them actually fails depends on whether PCRE JIT is enabled. */ protected const array KNOWN_UNSAFE_PATTERNS = [ - ModDependencyProblem::class => ["loading-failed-exception"], ]; /**