feat(dart): extract Flutter package graph and client HTTP - #755
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
95590df to
0a3717f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…t HTTP Configured tests.dart.packages own dart-import/dart-ref edges, dart test targets, and Uri.parse/http.* literals that match existing TS backend routes. Co-authored-by: Cursor <cursoragent@cursor.com>
Inline TS HTTP matching so Dart client calls can reuse route defs without a nine-argument helper. Co-authored-by: Cursor <cursoragent@cursor.com>
Nested `dart test` targets now use `dart pub --directory` so monorepo packages run from their pubspec. Client HTTP extraction skips comments and backend-prefix misses, and grouping strips package-relative selectors. Co-authored-by: Cursor <cursoragent@cursor.com>
Quoted or commented `name:` lines, raw URI literals, and `extension type` declarations are valid Dart/pubspec syntax and were dropping dart-import, http, and dart-ref edges. Co-authored-by: Cursor <cursoragent@cursor.com>
…ebase The nested-test commit still had conflict markers in the tests configuration page. Co-authored-by: Cursor <cursoragent@cursor.com>
…base Move Dart graph tests into the existing more-helpers module and fold Dart into Elixir glob and native-fallback match arms. Co-authored-by: Cursor <cursoragent@cursor.com>
…tion Keep native_fallback.rs under the 500-line cap by sharing the Dart-inclusive framework match with the language fallback helper. Co-authored-by: Cursor <cursoragent@cursor.com>
5431276 to
e7b5724
Compare
This comment has been minimized.
This comment has been minimized.
Raw `import r'...'` directives and `/path#fragment` literals are valid Dart and were dropping dart-import and http edges. Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
FrameworkPreparationPlan::all includes Dart next to Elixir, so the tests-graph demand expands to 14 runners. Co-authored-by: Cursor <cursoragent@cursor.com>
…lash hosts Word-boundary regexes and `$`/query-before-path guards stop phantom HttpCall edges from string interpolation, MyUri.parse, and hosted URLs whose first `/` is in the query. Co-authored-by: Cursor <cursoragent@cursor.com>
Clippy flags then(|| raw) as an unnecessary lazy evaluation. Co-authored-by: Cursor <cursoragent@cursor.com>
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ca172e4ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if file.ends_with(&format!("/{last}")) { | ||
| return true; |
There was a problem hiding this comment.
Keep grouped Dart selectors package-relative
Fresh evidence after the earlier grouped-argument report is this new suffix branch: for a configured package such as packages/app, it removes test/user_test.dart from runner_args, but grouped_execution_targets still stores packages/app/test/user_test.dart in test_files. A consumer assembling the documented grouped command therefore gets dart pub --directory packages/app run test packages/app/test/user_test.dart; the selector is interpreted within that package and points to a duplicated path, so grouped CI execution cannot find the test. Normalize the grouped test_files selectors to the package-relative form as well.
Useful? React with 👍 / 👎.
| let store = crate::codebase::ts_source::SourceStore::new(std::sync::Arc::new( | ||
| crate::codebase::ts_source::FileInventory::from_paths(&dart_files), | ||
| )); |
There was a problem hiding this comment.
Reuse the prepared source store for Dart HTTP
When a graph requests both Dart language edges and HTTP edges, collect_language_frontend_edges first reads every configured Dart file through the request's memoized SourceStore, but this collector then constructs a separate store and physically reads the same files again. This defeats the request-level single-read guarantee, doubles Dart source I/O on full graph and test-impact builds, and can make the HTTP edges observe different contents if a file changes during the request. Pass the prepared or visible-snapshot source store into this collector instead of creating a new one.
Useful? React with 👍 / 👎.
Summary
tests.dart.packages: exactimport/export/partURIs emitdart-import, capitalized types emitdart-ref, and empty package lists disable the extractor.tests plan dartover*_test.darttodart test <rel-path>, with native fallback onpubspec.yamland non-test.dartfiles.Uri.parse("/api/...")andhttp.get("/api/...")calls to existing TypeScript backend routes ashttpedges (no Dart server graph). Fixtures live undertest-cases/codebase-analysis/so the composedfixtures/lang-frontendsinventory is unchanged.Test plan
cargo test -p no-mistakes --lib dartcargo test -p no-mistakes --lib language_frameworksMade with Cursor
Shepherd Journal
if (dart.library.io)branches are later work.tests.dart.packagesalready yields no language projects, and suffix fallback matches Java/Kotlin when the dart runner is requested.name:.rprefix onUri.parseandhttp.*string arguments.extension type Namein the declaration regex.2294f287). Dart ownsEdgeKindsort keys (58, 0)/(59, 0);each_lang_mapis 9 slots andframework_plansis 14.language_frontends.rs,args.rs, andnative_fallback.rsstay within the 500-line test cap after landing next to Elixir.rprefix on directive strings.#fragmentin addition to query strings before HTTP matching.strip_comments_keep_stringshelper (#is a Python/Ruby/PHP comment). Dart#loadsymbol literals are later; do not change the shared stripper.