Skip to content

fix: resolve pre-existing CI failures - #159

Merged
CaiJingLong merged 3 commits into
mainfrom
fix/ci-preexisting-failures
Oct 23, 2026
Merged

CaiJingLong merged 3 commits into
mainfrom
fix/ci-preexisting-failures

Conversation

@AlexV525

Copy link
Copy Markdown
Member

Summary

Fixes all pre-existing CI failures that were independent of the SPM migration (#158).

Root causes & fixes

1. flutter analyze deprecation warnings → error

The example used deprecated Flutter / package APIs that newer stable Flutter flags as info, causing flutter analyze to exit non-zero.

Deprecated Replacement
Color.withOpacity(x) Color.withValues(alpha: x)
ImageSizeGetter.getSize() ImageSizeGetter.getSizeResult().size
ShowValueIndicator.always ShowValueIndicator.onDrag

Also bumped image_size_getter: ^2.1.2 → ^2.4.0 to get the getSizeResult API.

2. Ancient Flutter version matrix → runner incompatibility

try-add-to-new-project.yml tested against Flutter 3.0.5 / 3.7.0 / 3.10.6, which:

  • Generate Podfiles using File.exists? (removed in Ruby 3.4 on current runners)
  • Target Visual Studio 2019 (not installed on current windows-latest)

Fix: Rewrote to use stable only, one job per platform (matching flutter_photo_manager pattern).

3. runnable.sh fragility

The shell activated dart pub global run dartdoc (slow, version-sensitive). Replaced runnable.yml with inline workflow steps: per-package flutter analyze, dart doc --dry-run.

Verification

cd image_editor/example && flutter analyze lib
→ No issues found! (ran in 2.0s)

Concurrency

Both workflows now use concurrency: cancel-in-progress: true to auto-cancel stale runs.

Reference

CI patterns adopted from flutter_photo_manager (runnable.yml, check-compatibility.yml).

@AlexV525
AlexV525 force-pushed the fix/ci-preexisting-failures branch 7 times, most recently from 20fe5c3 to 65eaa51 Compare August 13, 2026 15:03
Example deprecation warnings (flutter analyze):
- Replace withOpacity() with withValues(alpha:)
- Replace getSize() with getSizeResult().size
- Replace ShowValueIndicator.always with .onDrag
- Bump image_size_getter to ^2.4.0 for getSizeResult API

Workflow modernization (reference flutter_photo_manager):
- runnable.yml: inline steps instead of runnable.sh, use dart doc
  --dry-run, add concurrency, analyze each package directly
- try-add-to-new-project.yml: replace ancient Flutter 3.0.5/3.7.0/3.10.6
  matrix with stable-only, one job per platform

@CaiJingLong CaiJingLong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The example deprecation fixes are appropriate, and local example analysis on Flutter 3.44.0 passes. However, the CI rewrite drops existing regression coverage.

  1. [P2] Restore unit-test execution — .github/workflows/runnable.yml:37-50. Replacing runnable.sh removes its flutter test step without an equivalent replacement. In particular, image_editor_platform_interface/test/color_option_test.dart is no longer executed by any workflow. Analysis and example builds do not assert the color-matrix results. Add an explicit package unit-test step/job and retain it as a required failure signal.
  2. [P2] Retain an older-Flutter library compatibility check — .github/workflows/try-add-to-new-project.yml:22-25 and the equivalent platform jobs. Every pinned older-SDK job is replaced with channel: stable, while the published library still declares Flutter >=2.10.0. Newer example tooling is acceptable, but it must not remove all evidence that the library works on older Flutter. Retain a representative supported older SDK (or add a dedicated minimum-version dependency/analyzer/test job), and address runner/toolchain incompatibilities separately. Pin compatible Ruby/Xcode/runner tooling where necessary instead of eliminating the compatibility check.

Validation: reviewed both complete workflows and all source/configuration changes, confirmed the removed test path in runnable.sh, ran example dependency resolution and flutter analyze --no-pub lib successfully with Flutter 3.44.0, and ran git diff --check. Existing GitHub checks on b61bda5 are green, but do not cover either gap above. No library Flutter minimum needs to be raised for these example-only API replacements.

CaiJingLong and others added 2 commits October 23, 2026 09:10
Run library analysis and unit tests on Flutter 3.7.12 and stable. Resolve package dependencies without the newer example application.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Preserve the already-merged Swift Package Manager integration and regenerate the example lockfile for this PR.

@CaiJingLong CaiJingLong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after re-reviewing the updated head and restoring the missing CI coverage. The two blocking CI findings from the previous review are addressed.

I added a library-only matrix on Flutter 3.7.12 and stable that analyzes all three library packages and runs image_editor_platform_interface/test/color_option_test.dart. It resolves package dependencies with dart pub get so the older SDK is not forced to resolve the newer example app. Existing current-stable platform builds remain in place. Flutter 3.7.12 is representative older-SDK coverage; this is not a claim that every configuration down to the declared 2.10 minimum has been built.

I also merged current main and regenerated the conflicting example lockfile, retaining the already-merged Swift Package Manager integration. No manual business-code edits were made. The PR's example API replacements were rechecked and the example library analysis passes.

Validation: local library analysis and both color-matrix unit tests pass on Flutter 3.7.12 and 3.47.7; example analysis and git diff --check pass. All 12 GitHub checks on the reviewed head have succeeded, including both new library-test jobs and Android/iOS/macOS/Windows/Linux/Web builds.

@CaiJingLong
CaiJingLong merged commit 95b1f14 into main Oct 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants