Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Nov 24, 2025

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#178529

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

Running flutter run -d chrome on a project with localization generation, the generated localizations classes are deleted immediately.

Changelog Description:

Explain this cherry pick:

  • In one line that is accessible to most Flutter developers.
  • That describes the state prior to the fix.
  • That includes which platforms are impacted.
    See best practices for examples.

When running flutter run -d chrome on projects with localizations, generated localizations sources are deleted on first run.

Workaround:

Is there a workaround for this issue?

  1. Run flutter run -d chrome, which will fail due to the generated localizations code being deleted
  2. Run flutter run -d chrome again, which will only rebuild the generated localizations code without rerunning the native hooks build step.

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

Run flutter run -d chrome in a project with localizations, ensure it actually starts.

…e build system (flutter#178840)

FlutterBuildSystem.trackSharedBuildDirectory stores a hash of the most
recently run build configuration in the output directory defined in the
environment.

If the build executed by FlutterHookRunnerNative uses the same output
directory as other builds, then trackSharedBuildDirectory may think that
the hook build's output list replaces the outputs of those previous
builds. trackSharedBuildDirectory will then incorrectly delete files in
the previous output list because they are not part of the hook build's
outputs.

See flutter#178529
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Nov 24, 2025
@flutteractionsbot
Copy link
Author

@bkonyi please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard
Copy link

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Nov 24, 2025
Copy link
Contributor

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

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 separate output directory for the native hooks build system to avoid conflicts with the main build. This is achieved by adding a copyWith method to the Environment class and using it in FlutterHookRunnerNative to create a new environment with a dedicated output subdirectory. A new test is added to verify this behavior. The changes are logical and well-tested. My feedback focuses on adding documentation to the new public members to align with the repository's style guide.

@bkonyi bkonyi requested a review from jason-simmons November 24, 2025 16:05
@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 2, 2025
@auto-submit auto-submit bot merged commit cf258ba into flutter:flutter-3.38-candidate.0 Dec 2, 2025
141 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 4, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants