Skip to content

fix(ci): honor pinned Flutter version on Windows runners#281

Merged
ericgriffin merged 1 commit into
mainfrom
fix/windows-ci-flutter-version-pin
May 20, 2026
Merged

fix(ci): honor pinned Flutter version on Windows runners#281
ericgriffin merged 1 commit into
mainfrom
fix/windows-ci-flutter-version-pin

Conversation

@ericgriffin
Copy link
Copy Markdown
Member

Summary

The Build Windows CI job has been failing on main with a Dart compile error:

material_design_icons_flutter-7.0.7296/lib/icon_map.dart: error: The class 'IconData' can't be extended outside of its library because it's a final class.

Root cause

The Read Flutter version step uses bash syntax ($(cat ...) and $GITHUB_OUTPUT) with no shell: override. Windows runners default to PowerShell, so the step silently produced an empty version output, and subosito/flutter-action fell back to the latest stable Flutter (3.44.0) instead of the pinned 3.41.4 used by every other platform.

Flutter 3.44.0 makes the framework's IconData a final class, which material_design_icons_flutter 7.0.7296 illegally extends — so the Windows-only Flutter upgrade broke the Dart kernel_snapshot step. This is unrelated to the upcoming windows-latest -> VS 2026 image migration (the runner was still VS 2022 / MSVC 14.44).

Fix

Add shell: bash to the build-windows Read Flutter version step in ci.yaml and release.yml so the pinned version is honored on Windows. This matches the pattern already used in native-plugin-tests.yml. The macOS/Linux jobs already default to bash and were unaffected.

Follow-ups (not in this PR)

  • material_design_icons_flutter (newest published is 7.0.7296, ~2 years stale) blocks any future intentional upgrade to Flutter 3.44+ and will need replacing.
  • The windows-latest -> windows-2025-vs2026 migration (~June 2026) is a separate, future concern; pinning windows-2022 would defer it.

Test plan

  • Both workflow files validated as well-formed YAML locally
  • CI Build Windows job passes on this PR (the definitive check)

🤖 Generated with Claude Code

The "Read Flutter version" step uses bash syntax ($(cat ...) and
$GITHUB_OUTPUT) with no shell override. Windows runners default to
PowerShell, so the step silently set no version output and
subosito/flutter-action installed the latest stable Flutter (3.44.0)
instead of the pinned 3.41.4. Flutter 3.44.0 makes IconData a final
class, which material_design_icons_flutter 7.0.7296 illegally extends,
breaking the Windows build at the Dart kernel_snapshot step.

Add `shell: bash` to the build-windows version-read step in ci.yaml and
release.yml, matching the existing native-plugin-tests.yml. The
macOS/Linux jobs already default to bash and were unaffected.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes Windows GitHub Actions builds by ensuring the pinned Flutter version from .github/flutter-version.txt is actually read on Windows runners (which default to PowerShell), preventing subosito/flutter-action from falling back to the latest stable Flutter.

Changes:

  • Set shell: bash for the “Read Flutter version” step in the Windows job in .github/workflows/ci.yaml.
  • Set shell: bash for the same step in the Windows job in .github/workflows/release.yml.
  • Add inline comments explaining why the shell override is required on Windows.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Forces bash for the Windows “Read Flutter version” step so the pinned Flutter version output is populated correctly.
.github/workflows/ci.yaml Same bash override for the Windows CI build job to prevent unintended Flutter upgrades on Windows runners.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@ericgriffin ericgriffin merged commit 7982225 into main May 20, 2026
20 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Submersion Release Tracker May 20, 2026
@ericgriffin ericgriffin deleted the fix/windows-ci-flutter-version-pin branch May 20, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants