From 6e79ac0aa2ddf33c80f99afa88d5d517227b39c9 Mon Sep 17 00:00:00 2001 From: Nitesh Balusu Date: Tue, 5 Aug 2025 10:51:01 -0400 Subject: [PATCH 1/2] add swift files to fallback list as the parser seems to be struggling with them and crashing. --- src/services/code-index/shared/supported-extensions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/code-index/shared/supported-extensions.ts b/src/services/code-index/shared/supported-extensions.ts index 16afddf828..80dd7102ff 100644 --- a/src/services/code-index/shared/supported-extensions.ts +++ b/src/services/code-index/shared/supported-extensions.ts @@ -21,6 +21,7 @@ export const scannerExtensions = allExtensions export const fallbackExtensions = [ ".vb", // Visual Basic .NET - no dedicated WASM parser ".scala", // Scala - uses fallback chunking instead of Lua query workaround + ".swift", // Swift - uses fallback chunking due to parser instability ] /** From f41836597257298d6251683abcdf8e1d8f8b7d0a Mon Sep 17 00:00:00 2001 From: Nitesh Balusu Date: Tue, 5 Aug 2025 11:03:27 -0400 Subject: [PATCH 2/2] update test case --- src/services/code-index/processors/__tests__/parser.vb.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/services/code-index/processors/__tests__/parser.vb.spec.ts b/src/services/code-index/processors/__tests__/parser.vb.spec.ts index 3448ed6737..3b17e0d67f 100644 --- a/src/services/code-index/processors/__tests__/parser.vb.spec.ts +++ b/src/services/code-index/processors/__tests__/parser.vb.spec.ts @@ -243,6 +243,7 @@ describe("Fallback Extensions Configuration", () => { // Extensions that should use fallback expect(shouldUseFallbackChunking(".vb")).toBe(true) expect(shouldUseFallbackChunking(".scala")).toBe(true) + expect(shouldUseFallbackChunking(".swift")).toBe(true) // Extensions that should not use fallback (have working parsers) expect(shouldUseFallbackChunking(".js")).toBe(false)