fix(parser): repair Swift indexing + dormant multi-language extraction#6
Merged
Conversation
Brings the previously-dormant grammars (Java/Kotlin/Swift/ObjC/C/C++/Go) into the extraction path and fixes the resolver/persist wiring so their symbols and cross-file edges land in the graph. Also fixes 3 E0597 borrow-checker errors that broke the build entirely: node.children(&mut cursor) iterator temporaries held as block-tail expressions were dropped after the local `cursor` — bound each to a local before returning (objc::first_identifier, kotlin::child_of_kind, kotlin call_expression fallback). Verified: cargo build/test green; 56 parser tests pass; fresh binary driven over MCP stdio indexes 9/10 languages on a mixed fixture. Known issue (pre-existing, network-gated fix): Swift parsing is still dead — tree-sitter-swift 0.7.3 is ABI 15 but the tree-sitter 0.24.7 runtime caps at ABI 14, so set_language() fails and every .swift file is skipped. Needs a runtime bump to 0.25 or a 0.6.x grammar pin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Swift files were silently dropped by the indexer: tree-sitter-swift 0.7.3 is generated at grammar ABI 15, but runtime tree-sitter 0.24.7 caps at ABI 14, so set_language() failed and indexer/mod.rs skipped every .swift file. Bump tree-sitter 0.24 -> 0.25 (first runtime with ABI 15 support). 0.25 deprecated Parser::set_timeout_micros; migrate all 10 parsers to one parse_with_timeout helper in parser/mod.rs that preserves the 5s per-file guard via a ParseOptions progress callback (returns true to cancel past the deadline, per tree-sitter api.h). Add test_swift_parser_standalone — the first Swift fixture — covering struct/class/enum/protocol/extension/init/deinit/subscript/property/ typealias/import/call, doubling as an ABI-15 regression guard. Verified: 71 parser tests green; MCP-stdio analyze on a 10-language fixture indexes 10/10 (was 9/10); App.swift symbols + Calls edge present on both deployed consumer binaries (health_check 0.5.0, 24 tools). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Résumé
Répare l'indexation Swift (morte silencieusement) et l'extraction multi-langage dormante dans automatised-pipeline.
Commits
fix(parser): répare l'extraction multi-langage dormante + erreurs de buildfix(parser): répare l'indexation Swift via tree-sitter 0.25 (ABI 15)Détail du fix Swift (bfebf41)
0.24→0.25(premier runtime avec grammar ABI 15 ; 0.24.7 plafonnait à ABI 14 →set_languageéchouait → l'indexeur ignorait silencieusement les.swift).0.25déprécieset_timeout_micros→ migration des 10 parsers vers un helper uniqueparse_with_timeout(ParseOptionsprogress_callback retournetruepour ANNULER au-delà de 5s ; vérifié viaapi.h, pas deviné).test_swift_parser_standalone(première fixture Swift ; garde-fou contre régression ABI).Vérification
files_indexed10/10 (était 9/10) ; edgeApp.swift::helper#1+run→helperprésent.health_check0.5.0 / 24 tools / 10-of-10.🤖 Generated with Claude Code