Skip to content

[tool][web] Remove redundant '--enable-experiment=record-use' flag from web compilers #190465

Closed

Description

@kevmoo

When compiling web targets (dart2js and dart2wasm) or running dry runs with the record-use feature flag enabled, flutter_tools explicitly passes --enable-experiment=record-use to the compiler.

Since record-use is now enabled by default in recent Dart SDK versions (Dart 3.14+), passing this experimental flag causes warning spam in console output during both regular web compilation and embedded Wasm dry-runs:

'record-use' is now enabled by default; this flag is no longer required."
'record-use' is now enabled by default; this flag is no longer required."

Proposed Changes

  1. Remove the unconditional injection of --enable-experiment=record-use in Dart2JSTarget.build and Dart2WasmTarget.build within lib/src/build_system/targets/web.dart.
  2. Update unit tests in test/general.shard/build_system/targets/web_test.dart and web_dry_run_test.dart to remove the expected flag from FakeCommand arrays.

Activity

  1. self-assigned this
    on Aug 3, 2026
  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-webWeb applications specifically
    a: buildBuilding flutter applications with the tool
    on Aug 3, 2026
  3. added a commit that references this issue on Aug 4, 2026
    92cf395
  4. added a commit that references this issue on Aug 4, 2026
    89b263d
  5. added 2 commits that reference this issue on Aug 5, 2026
    ebd8429
    27b0988
  6. github-actions commented on Aug 18, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: buildBuilding flutter applications with the toolplatform-webWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions