Skip to content

feat: add Dart symbol indexing#374

Merged
ajianaz merged 2 commits into
developfrom
feat/dart-symbol-indexing
Jul 24, 2026
Merged

feat: add Dart symbol indexing#374
ajianaz merged 2 commits into
developfrom
feat/dart-symbol-indexing

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds regex-based Dart symbol extraction to cora index, enabling cora explore, cora brain, cora callers, cora trace, and cora impact for Dart/Flutter projects.

Closes #373

Changes

src/index/extract.rs

  • 7 regex patterns: RE_DART_CLASS, RE_DART_ENUM, RE_DART_EXTENDS, RE_DART_EXTENDS_UNNAMED, RE_DART_FN, RE_DART_TYPEDEF, RE_DART_GETTER
  • extract_dart() function handling: classes, mixins, enums, extensions (named + unnamed), functions, getters, typedefs
  • Added "dart" to extract_symbols match arm, detect_function_entry, scope tracking, and is_builtin

src/engine/context/extraction.rs

  • Added "dart" to Java/Kotlin context extraction arm (shared import/call/type patterns)
  • Added "dart" to definition extraction for PR review context chain

Tests

Approach

Regex fallback (same as 13 other languages). Tree-sitter Dart can be added later via the existing feature-gated AST path for deeper call edge extraction. This unblocks all index/brain/trace/impact commands for Dart projects today with zero new dependencies.

Verification

$ cargo clippy  # 0 warnings
$ cargo test     # 733 passed, 0 failed

ajianaz added 2 commits July 24, 2026 11:18
- Add regex-based Dart extraction: classes, mixins, enums, extensions,
  functions, getters, setters, typedefs
- Add Dart to context extraction (imports, calls, types)
- Add Dart to scope tracking and function entry detection
- Add Dart-specific builtins to filter list
- Add 2 tests: comprehensive + issue #373 reproduction
- Update CHANGELOG.md
@ajianaz
ajianaz merged commit 7d6b7ea into develop Jul 24, 2026
10 checks passed
@ajianaz
ajianaz deleted the feat/dart-symbol-indexing branch July 24, 2026 06:53
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.

bug(index): cora index extracts 0 symbols from Dart/Flutter — code intelligence is a no-op for Flutter projects

1 participant