Repository navigation
Added flutter/dart support - #130
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also document Dart/Flutter support in README, CHANGELOG and the dev guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bundled grammar predates null-aware collection elements, which broke parsing of whole files. The '?' is replaced with a space so positions stay unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unresolved Dart callees no longer fall back to repo-wide or cross-language name matching (Size bound to the Windows runner header, Row to Kotlin). Private members of private classes stay inside their library. Drift's _$X bases are no longer treated as notifiers, unnamed extensions get unique ids, annotations are kept in snippets, more generated files are ignored, and tree-sitter-language-pack is capped below 0.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scoped resolution merged exact and short-name index hits before requiring a unique match, so an imported top-level helper() became ambiguous with any visible Tool.helper method and the edge was dropped. Try exact names first and only widen to short names when nothing matched exactly, which also mirrors Dart's lexical-before-this lookup.
package: URIs map to repository files through pubspec.yaml. When none is in the analyzed tree (e.g. only lib/ was analyzed), every import resolved to nothing while callers were still treated as scoped, so almost every cross-file edge was silently dropped. Keep library-private scoping, but match public names across all Dart files in that case and log a warning. Dart resolution stays authoritative either way, so there is still no cross-language guessing.
The pattern targets injectable's generated injection.config.dart, but hand-written files such as app.config.dart are common and were silently excluded. Dropping one generated file's noise is not worth losing user code; users can still exclude it explicitly.
Collaborator
|
Thanks a lot for this, @majmohar4. I pushed three small commits on top of your branch (hope that's OK):
Left for follow-ups:
|
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.
Add Dart / Flutter support
Adds a Dart analyzer so CodeWiki can document Dart and Flutter projects.
.dartfiles go through the same dependency-analysis and doc-generation pipeline as the other languages.What's included
Core Dart analysis (
analyzers/dart.py,analyzers/dart_imports.py)extends/with/implements), field types, instantiations and calls.package:and relative imports,exports andpart/part offiles decide which definition a name resolves to._name) declarations never resolve outside their library.Rowresolving to a Kotlin class).ontype, andthis.fieldreceivers are resolved.Flutter-aware edges (
analyzers/dart_flutter.py)Stateclasses are typed, and instantiations insidebuild()become widget-to-widget edges.ref.watch/ref.readlink widgets to Riverpod providers, including@riverpodcodegen.Robustness
*.g.dart,*.freezed.dart, etc.) and.dart_tool/are ignored.?x) are blanked before parsing, because the bundled grammar doesn't support them yet. Byte positions are unchanged.Other changes
tree-sitter-language-packis pinned to>=0.8.0,<0.9.0. The Dart grammar/API in 0.9 is not yet verified.guides/development.mdare updated..dartis added to the CLI/MCP language validation.Testing
tests/test_dart_analyzer.py,tests/test_dart_flutter.py,tests/test_dart_imports.py,tests/test_doc_layout.py. All 62 pass.Notes for reviewers
call_graph_analyzer.pychanges in a significant way (+156 lines) ou, to register the analyzer and the Dart file handling.