Repository navigation
feat(dart): add dart and flutter command filtering support - #2456
vivekkartha wants to merge 4 commits into
Conversation
4c12153 to
22b54bb
Compare
Add TOML filters and rewrite rules for dart and flutter CLI tools. Covers command outputs from dart analyze, dart test, dart pub, flutter analyze, flutter test, and flutter pub. Each filter strips boilerplate (downloads, loading lines, blank lines) and short-circuits on success (no issues, all tests passed). Validation: cargo fmt, cargo clippy, cargo test (2195 pass, 0 fail), rtk verify (159/159 TOML tests pass).
Match dart pub get/add/upgrade/downgrade/outdated consistently across rules.rs and dart-pub-get.toml filter. Co-authored-by: CommandCodeBot <[email protected]>
Strip pub preamble, plugin compatibility warnings, and build-time notices from flutter test output so only test results remain. Co-authored-by: CommandCodeBot <[email protected]>
dart run build_runner: strip AOT compile progress and per-file intermediate lines (~70% savings), keep builder summaries, warnings, and Build line. flutter build: strip pub preamble, plugin compatibility warnings, compilation spinners, tree-shaking noise (~75% savings), keep Wasm dry run findings, build errors, and Build line. Both cross-platform: patterns work on macOS/Linux/Windows. Co-authored-by: CommandCodeBot <[email protected]>
50645fb to
dabb1cc
Compare
|
@vivekkartha @felipematheus Both of your implementations look great! I'd love to suggest my own approach as well, and hopefully we can align on the best direction together. Unfortunately, I can't open PRs directly on your repositories, so I'm sharing my take here. My main difference is that I prefer rewriting command output over purely filtering it: instead of stripping lines, I summarize them into a compact form that keeps the specific information an LLM actually needs (exit status, failure blocks, warnings, tail context, etc.). In my experience, this is more token-efficient and has been working well internally for weeks. I've integrated your contributions and reference filters into my branch directly, keeping the best parts of each approach. Let me know if you have any feedback, I would be happy to iterate! Have a look there: https://github.com/Olyno/rtk/tree/feat/flutter-dart-integration |
feat(dart): Dart & Flutter TOML filters (hardened from upstream PR rtk-ai#2456)
|
This pull request has been automatically marked as stale due to 90 days of inactivity. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. Your contribution is very much appreciated — we're sorry we haven't been able to review it yet. |
|
ok |
|
Bump |
|
These filters are extremely useful, when will this getting merged? |
|
By the way, i didn't get any feedback about my idea/comment. What do you guys think about it? |
Summary
Add TOML command filters and rewrite rules for Dart and Flutter CLI tools.
What's included
8 new TOML filters:
dart analyze— strip headers and info-level issues, keep error/warning and summarydart test— strip loading lines, short-circuit on all-passingdart pub get— strip package download lines, keep summary and warningsflutter analyze— strip headers and info-level issues, keep error/warning and summaryflutter test— strip pub download preamble and loading lines, keep all test resultsflutter pub get— strip package download lines, keep summary and warningsdart run build_runner— strip AOT progress, keep summaries/warningsflutter build— strip pub noise, tree-shaking, keep build result + Wasm notes8 new rewrite patterns in
discover/rules.rsREADME — new Dart & Flutter section in command listing
Design
TOML-only approach (zero Rust code). Each filter follows existing patterns —
strip_lines_matchingfor noise removal,match_outputfor success short-circuit. No changes tomain.rs.Validation
Conflicts fixed
Rebased onto latest
developto resolve merge conflicts (was "dirty"). Updated filter counts insrc/core/toml_filter.rs(now 71 built-in) and ensured rules/README merged cleanly. Verified locally.Related
dart analyze,dart pub,dart test)