Sitelet https://github.com/flutter/flutter/pull/191083
Skip to content

[tool] Warn when rendering backend selection flags are used with release builds - #191083

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
bkonyi:issue-191027
Aug 13, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:masterfrom
bkonyi:issue-191027

Conversation

@bkonyi

@bkonyi bkonyi commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Description

Flags like --enable-impeller and --no-enable-impeller are ignored in release builds because the rendering backend is determined at build time.

This change emits a warning in FlutterCommand.verifyThenRunCommand when these flags are parsed during release builds.

Related Issues

Tests

  • Added unit tests in flutter_command_test.dart verifying warnings are emitted for --release --enable-impeller and --release --no-enable-impeller, and not emitted for debug builds or release builds without impeller flags.

…ase builds

Flags like `--enable-impeller` and `--no-enable-impeller` are ignored in release builds because the rendering backend is determined at build time.

This change adds a warning in `FlutterCommand.verifyThenRunCommand` when these flags are parsed during release builds.

Fixes flutter#191027
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 13, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a warning in FlutterCommand.verifyThenRunCommand when the --enable-impeller or --no-enable-impeller flag is supplied in release builds, along with corresponding unit tests. However, calling getBuildMode() unconditionally can cause an ArgumentError for commands that do not register build mode flags. It is recommended to check if the command supports build modes before invoking getBuildMode().

Comment thread packages/flutter_tools/lib/src/runner/flutter_command.dart Outdated
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 13, 2026
@bkonyi
bkonyi requested a review from chingjun August 13, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tool] add warning when rendering backend selection flags are used with release builds

2 participants