Skip to content

fix(parser): repair Swift indexing + dormant multi-language extraction#6

Merged
cdeust merged 2 commits into
mainfrom
feat/mcp-registry-submission
Jul 3, 2026
Merged

fix(parser): repair Swift indexing + dormant multi-language extraction#6
cdeust merged 2 commits into
mainfrom
feat/mcp-registry-submission

Conversation

@cdeust

@cdeust cdeust commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Résumé

Répare l'indexation Swift (morte silencieusement) et l'extraction multi-langage dormante dans automatised-pipeline.

Commits

  • e00e164fix(parser): répare l'extraction multi-langage dormante + erreurs de build
  • bfebf41fix(parser): répare l'indexation Swift via tree-sitter 0.25 (ABI 15)

Détail du fix Swift (bfebf41)

  • Cargo.toml : tree-sitter 0.240.25 (premier runtime avec grammar ABI 15 ; 0.24.7 plafonnait à ABI 14 → set_language échouait → l'indexeur ignorait silencieusement les .swift).
  • src/parser/mod.rs : 0.25 déprécie set_timeout_micros → migration des 10 parsers vers un helper unique parse_with_timeout (ParseOptions progress_callback retourne true pour ANNULER au-delà de 5s ; vérifié via api.h, pas deviné).
  • tests/multilang_integration.rs : test_swift_parser_standalone (première fixture Swift ; garde-fou contre régression ABI).

Vérification

  • 71 tests parser passent ; build + clippy propres sur le code touché.
  • MCP-stdio analyze sur fixture 10 langages : files_indexed 10/10 (était 9/10) ; edge App.swift::helper#1 + run→helper présent.
  • Binaires consommateurs re-signés, health_check 0.5.0 / 24 tools / 10-of-10.

🤖 Generated with Claude Code

cdeust and others added 2 commits July 3, 2026 20:40
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>
@cdeust cdeust merged commit 0b33b03 into main Jul 3, 2026
1 check passed
@cdeust cdeust deleted the feat/mcp-registry-submission branch July 3, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant