d48cda4081
CI / Test (ubuntu-latest, Node 18.x, bun) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, npm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, pnpm) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 18.x, yarn) (push) Failing after 15m1s
CI / Test (ubuntu-latest, Node 20.x, bun) (push) Failing after 17m13s
CI / Test (ubuntu-latest, Node 20.x, npm) (push) Failing after 18m42s
CI / Test (ubuntu-latest, Node 20.x, pnpm) (push) Failing after 15m0s
CI / Test (ubuntu-latest, Node 20.x, yarn) (push) Failing after 49m44s
CI / Test (ubuntu-latest, Node 22.x, bun) (push) Failing after 51m55s
CI / Test (ubuntu-latest, Node 22.x, pnpm) (push) Failing after 21m57s
CI / Test (ubuntu-latest, Node 22.x, npm) (push) Failing after 37m39s
CI / Test (ubuntu-latest, Node 22.x, yarn) (push) Failing after 34m7s
CI / Validate Components (push) Failing after 37m15s
CI / Python Tests (push) Failing after 10m1s
CI / Security Scan (push) Failing after 10m1s
CI / Lint (push) Failing after 17m12s
CI / Coverage (push) Failing after 20m19s
CI / Test (macos-latest, Node 18.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 18.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 20.x, yarn) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, bun) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (macos-latest, Node 22.x, yarn) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, npm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, pnpm) (push) Has been cancelled
CI / Test (windows-latest, Node 22.x, yarn) (push) Has been cancelled
3.2 KiB
3.2 KiB
description
| description |
|---|
| Dartアナライザーエラーとflutterビルドの障害をインクリメンタルに修正します。最小限の外科的修正のためにdart-build-resolverエージェントを呼び出します。 |
Flutterビルドと修正
このコマンドはdart-build-resolverエージェントを呼び出し、Dart/Flutterビルドエラーを最小限の変更でインクリメンタルに修正します。
このコマンドの動作
- 診断を実行:
flutter analyze、flutter pub getを実行 - エラーを解析: ファイルごとにグループ化し、重大度でソート
- インクリメンタルに修正: 一度に1つのエラー
- 各修正を検証: 各変更後に分析を再実行
- サマリーを報告: 修正されたものと残りを表示
使用するタイミング
/flutter-buildを使用するのは:
flutter analyzeがエラーを報告する場合- いずれかのプラットフォームで
flutter buildが失敗する場合 dart pub get/flutter pub getがバージョン競合で失敗する場合build_runnerがコード生成に失敗する場合- ビルドを壊す変更をプルした後
実行される診断コマンド
# 分析
flutter analyze 2>&1
# 依存関係
flutter pub get 2>&1
# コード生成(プロジェクトがbuild_runnerを使用する場合)
dart run build_runner build --delete-conflicting-outputs 2>&1
# プラットフォームビルド
flutter build apk 2>&1
flutter build web 2>&1
一般的に修正されるエラー
| エラー | 典型的な修正 |
|---|---|
A value of type 'X?' can't be assigned to 'X' |
?? defaultまたはnullガードを追加 |
The name 'X' isn't defined |
importを追加またはタイプミスを修正 |
Non-nullable instance field must be initialized |
初期化子またはlateを追加 |
Version solving failed |
pubspec.yamlのバージョン制約を調整 |
Missing concrete implementation of 'X' |
欠落したインターフェースメソッドを実装 |
build_runner: Part of X expected |
古い.g.dartを削除して再ビルド |
修正戦略
- 分析エラーを最初に — コードがエラーフリーでなければならない
- 警告のトリアージを次に — ランタイムバグを引き起こす可能性のある警告を修正
- pub競合を3番目に — 依存関係の解決を修正
- 一度に1つの修正 — 各変更を検証
- 最小限の変更 — リファクタリングせず、修正のみ
停止条件
エージェントは以下の場合に停止して報告する:
- 3回の試行後も同じエラーが持続
- 修正がより多くのエラーを導入
- アーキテクチャ変更が必要
- パッケージアップグレード競合にユーザー判断が必要
関連コマンド
/flutter-test— ビルド成功後にテストを実行/flutter-review— コード品質をレビューverification-loopスキル — 完全な検証ループ
関連
- エージェント:
agents/dart-build-resolver.md - スキル:
skills/flutter-dart-code-review/