fix(ci): honor pinned Flutter version on Windows runners#281
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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: bashfor the “Read Flutter version” step in the Windows job in.github/workflows/ci.yaml. - Set
shell: bashfor 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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
Build WindowsCI job has been failing onmainwith a Dart compile error:Root cause
The
Read Flutter versionstep uses bash syntax ($(cat ...)and$GITHUB_OUTPUT) with noshell:override. Windows runners default to PowerShell, so the step silently produced an emptyversionoutput, andsubosito/flutter-actionfell 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
IconDataafinalclass, whichmaterial_design_icons_flutter7.0.7296 illegally extends — so the Windows-only Flutter upgrade broke the Dartkernel_snapshotstep. This is unrelated to the upcomingwindows-latest-> VS 2026 image migration (the runner was still VS 2022 / MSVC 14.44).Fix
Add
shell: bashto thebuild-windowsRead Flutter versionstep inci.yamlandrelease.ymlso the pinned version is honored on Windows. This matches the pattern already used innative-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.windows-latest->windows-2025-vs2026migration (~June 2026) is a separate, future concern; pinningwindows-2022would defer it.Test plan
Build Windowsjob passes on this PR (the definitive check)🤖 Generated with Claude Code