Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

auto-submit[bot]
Copy link
Contributor

@auto-submit auto-submit bot commented Jun 16, 2025

Reverts: #170374

Initiated by: jtmcdole

Reason for reverting: "Consistently failed across all 3 executions"

Original PR Author: dcharkes

Reviewed By: {vashworth, bkonyi}

This change reverts the following previous change:
Closes: #168961

This PR ensures the build hooks of dev_dependencies are run on flutter test integration_test.

flutter test already builds dev dependencies. However, package:integration_test is using flutter assemble which should not have dev dependencies included (flutter build should not bundle dev deps).

So, this PR adds a build define that's threaded through from flutter test to flutter assemble. It's threaded through gradle and xcode via BuildInfo and subsequently read in tool backend where it is added as an Environment define. Finally it is read in the Target that builds the native assets.

One quirk is flutter run test integration_test -d flutter-tester. (No idea why someone would run that, but it works.) This doesn't spin up Gradle or XCode. So the environment is set directly.

Edit: We use the simpler kBuildMode to decide whether to include the native assets for dev dependencies.

Testing

  • The desktop OSes and flutter-tester are tested in packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart.
  • iOS simulator, device, and Android device are tested in the device lab.
  • (All tests were added to existing tests, hopefully these don't start timing out.)

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@auto-submit auto-submit bot requested a review from matanlurey as a code owner June 16, 2025 15:15
@auto-submit auto-submit bot added the revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. label Jun 16, 2025
@auto-submit auto-submit bot added the revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. label Jun 16, 2025
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jun 16, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Jun 16, 2025
Merged via the queue into master with commit a33b81c Jun 16, 2025
11 of 14 checks passed
@auto-submit auto-submit bot deleted the revert_02abf62968c147926079c97ad01feb7dbe540812 branch June 16, 2025 15:49
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 19, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 19, 2025
mboetger pushed a commit to mboetger/flutter that referenced this pull request Jul 21, 2025
…gration_test` (flutter#170374)" (flutter#170673)

<!-- start_original_pr_link -->
Reverts: flutter#170374
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: "Consistently failed across all 3 executions"
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: dcharkes
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {vashworth, bkonyi}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Closes: flutter#168961

This PR ensures the build hooks of `dev_dependencies` are run on
`flutter test integration_test`.

`flutter test` already builds dev dependencies. However,
`package:integration_test` is using `flutter assemble` which should not
have dev dependencies included (`flutter build` should not bundle dev
deps).

~~So, this PR adds a build define that's threaded through from `flutter
test` to `flutter assemble`. It's threaded through gradle and xcode via
`BuildInfo` and subsequently read in tool backend where it is added as
an `Environment` define. Finally it is read in the `Target` that builds
the native assets.~~

~~One quirk is `flutter run test integration_test -d flutter-tester`.
(No idea why someone would run that, but it works.) This doesn't spin up
Gradle or XCode. So the environment is set directly.~~

Edit: We use the simpler `kBuildMode` to decide whether to include the
native assets for dev dependencies.

## Testing

* The desktop OSes and `flutter-tester` are tested in
`packages/flutter_tools/test/integration.shard/isolated/native_assets_test.dart`.
* iOS simulator, device, and Android device are tested in the device
lab.
* (All tests were added to existing tests, hopefully these don't start
timing out.)

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <[email protected]>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revert of Bot Only: Tracking label for bot. Tracks new revert of pull requests. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native assets] Support flutter test integration_test
2 participants