release/api-compatibility/flutter
A library checks its API against the previous release
Implements release/api-compatibility for flutter.
| Severity | info |
| Tiers | 1 |
| Stacks | flutter |
| Scope | root |
| Kind | outcome |
| Source | library v0.5.0 |
| Selected by | fleetlint-recommended@v0.5.0 |
Requirement
A Dart or Flutter package that is published (no publish_to: none) runs dart_apitool against the previous release.
Why
A breaking change in a minor release is found by every user at once; the check finds it before the tag.
Applies when
file("pubspec.yaml") && scan("pubspec.yaml", r'^publish_to:\s*\S*none').size() == 0 && exists("lib/*.dart")Fix
Run dart_apitool diff --old pub://<package>/<previous> --new . in the release workflow.
Agent instruction: Add the stack’s API compatibility tool to the release workflow, comparing against the latest tag; on a breaking change bump the major version instead of silencing the tool.
A finding of this rule points at the file tagged_workflows().size() > 0 ? tagged_workflows()[0] : ".github/workflows/release.yml" yields.
Sources
- https://semver.org/spec/v2.0.0.html (standard)
- https://fleetlint.org/baseline/#releases (convention)
- https://pub.dev/packages/dart_apitool (spec)
- https://fleetlint.org/stacks/#flutter–dart
Generated by fleetlint docs from catalog v0.5.0.