Repository navigation
Description
Summary
cora index extracts 0 symbols from .dart files, even though Dart/Flutter is listed as a currently supported language in epic #268 and the README states "index symbols across 15 languages." This makes the entire code-intelligence feature set (explore, brain, callers, impact, trace, arch, affected) a no-op for Flutter projects — the most common Dart use case.
This is a code-intelligence / cora index gap, distinct from the review analyzers (which DO support Dart via prompt enrichment, per #233). Only review/scan works for Dart today; indexing does not.
Reproduction (isolated, minimal)
Two files with identical content, differing only by extension, in an empty directory:
// sample.dart AND sample.py — same bytes
class UserService {
String? name;
void login(String email) {
print(email);
}
}
Future<void> fetchData() async {
return Future.value();
}
enum Status { active, inactive }$ cora index -v
🔍 Indexing project...
✅ Indexed 1 symbols from 2 files (0 skipped, 0 errors)
Database: ~/.codecora/cora-code/graph.db
$ cora index --stats (By Language)
py 1 # <- only Python extracted
# Dart contributed 0 symbols
A class, a void method, a Future<...> function, and an enum — standard Dart idioms that a regex extractor for a C-family language should catch — all ignored.
Broader probe
A probe with one minimal file per extension (class Probe { void run() {} }) confirmed these languages do extract symbols:
py, js, ts, java, kt, swift, c, cpp, php, rb, scala, lua (12)
dart produces nothing. (Note: go/rs/cs/zig also didn't match in this probe, but that's expected — they don't use class{} syntax — so I'm not claiming they're unsupported. Dart, however, DOES use class{}/enum{} syntax and still fails, which is the bug.)
Why this is surprising / inconsistency with tracking
| Source | Claim about Dart in indexing |
|---|---|
| #268 (closed Done, milestone v0.7) | "Currently supported: Dart/Flutter, Svelte, TypeScript, Go, Rust, Python" — and #268 depends on #264 (cora index), i.e. scoped to symbol extraction |
| README | "🔍 Code Intelligence — index symbols across 15 languages, call graph, trace, impact analysis" |
Actual cora index |
0 Dart symbols |
So there's a gap between the "Done" status of #268 (which framed Dart as currently-supported for code intelligence) and the shipped behavior of cora index.
No config workaround
Adding a per-project language override is not possible — the index field is rejected:
# .cora.yaml
index:
languages: [dart, py, kt]Error: config parse error: unknown field `index`, expected one of
`provider`, `model`, `base_url`, `focus`, `rules`, `ignore`, `hook`,
`quality_gate`, `output`, `review`, `scan`, `llm`, `rules_engine`,
`bundling`, `debt`, `profile`
The rules / rules_engine fields are review-scanning only (flag issues), not symbol-definition extraction.
Environment
- cora-code 0.8.1 (prebuilt
aarch64-apple-darwin), macOS arm64 - Test project: Flutter app, 109
.dartfiles underlib/(models, widgets, blocs, repositories, routes) → index yielded 0 Dart symbols; only 4 Swift + 1 Kotlin native files were indexed (5 total).
Suggested fix
Add a Dart definition-extraction regex pattern alongside the existing 13 languages. Dart is a C-family syntax and should map cleanly to the same patterns already used for Java/Kotlin/TypeScript:
- class:
(abstract\s+)?class\s+(\w+) - enum:
enum\s+(\w+) - function:
(?:static\s+)?(?:async\s+)?[\w<>\[\],?\s]+\s+(\w+)\s*\((coversvoid fn(),Future<T> fn(),String fn(args)) - typedef:
typedef\s+(\w+)
Dart already has review-guidance support (#233); wiring it into cora index would make code intelligence usable for the large Flutter ecosystem.
Related
- Depends-on / gap-vs: feat: Language expansion — 6 → 15+ language support #268 (claimed Dart currently supported for code intelligence)
- Depends-on: feat:
cora index— Symbol index & SQLite persistence #264 (cora index) - Review-only Dart support: Feature: Language-specific analyzers - Dart/Flutter, Svelte/TS, Go #233
Activity
feat: add Dart symbol indexing (#374)