From 0e649956ea9db3285252b61ddd5c2cf5d81385b4 Mon Sep 17 00:00:00 2001 From: 13xforever Date: Sat, 26 Jul 2025 19:52:46 +0500 Subject: [PATCH] fix another cpu tier misdetection --- CompatBot/Ocr/OcrProvider.cs | 1 + SourceGenerators/CpuTierListGenerator.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CompatBot/Ocr/OcrProvider.cs b/CompatBot/Ocr/OcrProvider.cs index a0f9052f..f2e36b2b 100644 --- a/CompatBot/Ocr/OcrProvider.cs +++ b/CompatBot/Ocr/OcrProvider.cs @@ -26,6 +26,7 @@ public static class OcrProvider backendName = "tesseract"; result = GetBackend(backendName)!; } + Config.Log.Info($"Initializing OCR backend {BackendName}…"); if (await result.InitializeAsync(cancellationToken).ConfigureAwait(false)) { backend = result; diff --git a/SourceGenerators/CpuTierListGenerator.cs b/SourceGenerators/CpuTierListGenerator.cs index 5e9005cd..0b6a1319 100644 --- a/SourceGenerators/CpuTierListGenerator.cs +++ b/SourceGenerators/CpuTierListGenerator.cs @@ -75,11 +75,11 @@ public class CpuTierListGenerator: IIncrementalGenerator ); */ result.AppendLine($""" - private static readonly Regex Model{idx++} = new(@"{line}", DefaultOptions); + private static readonly Regex Model{idx++} = new(@"\b{line}", DefaultOptions); """ ); } - result.AppendLine($""" + result.AppendLine(""" public static readonly List<(string model, string tier, Regex regex)> List = [ """