feat: run local Dart tasks via Dagger (#417) #418

Merged
guettlibot merged 3 commits from refs/pull/418/head into main 2026-06-05 09:50:50 +00:00
guettlibot commented 2026-06-04 10:53:52 +00:00 (Migrated from codeberg.org)

Summary

  • Adds `CheckFast`, `Analyze`, `FormatWrite`, `Codegen`, and `AnalyzeFix` Dagger functions to `ci/main.go`
  • Updates `format`, `codegen`, `analyze`, `analyze-fix`, and `check-fast` Taskfile tasks to delegate to Dagger and export modified files back to the host (`-o .`)
  • Updates the `dart-check` pre-commit hook to run `dagger call ... check-fast` instead of `scripts/pre_commit_check.sh`

These tasks no longer require a local Dart/Flutter SDK installation — Dagger pulls the toolchain image and runs everything in a container.

New Dagger functions

Function Returns What it does
`CheckFast(ctx)` `string` Runs CheckHygiene, CheckLayers, Format, Analyze, CheckMocks, Coverage in parallel
`Analyze(ctx)` `string` `dart analyze --fatal-infos`
`FormatWrite()` `*dagger.Directory` `dart format lib test` — writes files, returns `/src`
`Codegen()` `*dagger.Directory` `flutter pub run build_runner build` — returns `/src` with generated files
`AnalyzeFix()` `*dagger.Directory` `dart fix --apply` — writes files, returns `/src`

Test plan

  • `task format` — runs Dagger, exports formatted files back to `.`
  • `task codegen` — runs Dagger, exports generated `.g.dart` files back to `.`
  • `task analyze` — runs Dagger, prints analysis output
  • `task analyze-fix` — runs Dagger, exports fixed files back to `.`
  • `task check-fast` — runs all fast checks in parallel via Dagger
  • Pre-commit hook triggers `dagger call ... check-fast` on commit

Closes #417

🤖 Generated with Claude Code

## Summary - Adds \`CheckFast\`, \`Analyze\`, \`FormatWrite\`, \`Codegen\`, and \`AnalyzeFix\` Dagger functions to \`ci/main.go\` - Updates \`format\`, \`codegen\`, \`analyze\`, \`analyze-fix\`, and \`check-fast\` Taskfile tasks to delegate to Dagger and export modified files back to the host (\`-o .\`) - Updates the \`dart-check\` pre-commit hook to run \`dagger call ... check-fast\` instead of \`scripts/pre_commit_check.sh\` These tasks no longer require a local Dart/Flutter SDK installation — Dagger pulls the toolchain image and runs everything in a container. ## New Dagger functions | Function | Returns | What it does | |---|---|---| | \`CheckFast(ctx)\` | \`string\` | Runs CheckHygiene, CheckLayers, Format, Analyze, CheckMocks, Coverage in parallel | | \`Analyze(ctx)\` | \`string\` | \`dart analyze --fatal-infos\` | | \`FormatWrite()\` | \`*dagger.Directory\` | \`dart format lib test\` — writes files, returns \`/src\` | | \`Codegen()\` | \`*dagger.Directory\` | \`flutter pub run build_runner build\` — returns \`/src\` with generated files | | \`AnalyzeFix()\` | \`*dagger.Directory\` | \`dart fix --apply\` — writes files, returns \`/src\` | ## Test plan - [ ] \`task format\` — runs Dagger, exports formatted files back to \`.\` - [ ] \`task codegen\` — runs Dagger, exports generated \`.g.dart\` files back to \`.\` - [ ] \`task analyze\` — runs Dagger, prints analysis output - [ ] \`task analyze-fix\` — runs Dagger, exports fixed files back to \`.\` - [ ] \`task check-fast\` — runs all fast checks in parallel via Dagger - [ ] Pre-commit hook triggers \`dagger call ... check-fast\` on commit Closes #417 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.