Skip to content

Conversation

@flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Feb 27, 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?

#164024

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

#164024: Add back an empty io.flutter.app.FlutterApplication for Android apps that reference that class post v2 embedder migration

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 production app (the app crashes on launch)

The class does not provide any additional funcitonality, but it class was removed without sufficient notice in the breaking changes section of the Flutter documentation. As such, consumers of this class were broken without sufficient time to migrate.

Workaround:

Is there a workaround for this issue?

Flutter projects which need a custom Application can instead simply extend an android.app.Application. There is no reason to extend a FlutterApplication.

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?

Either make a flutter app which depends on this class, or run the spell check integration tests:

# from the .../flutter/dev/devicelab directory
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t spell_check_test

…ice, and un-break projects that have not migrated (flutter#164233)

The removal of the v1 embedding missed that this class was not marked as
deprecated, and did not provide a notice in the breaking changes
section. V1 apps that needed the functionality of the old
`FlutterApplication` were all broken in the previous release, but some
V2 apps have been referencing the v1 `FlutterApplication`.

For these apps, this is the same as extending the base
`android.app.Application`. So we can provide an "empty extension" of
that base class, to provide these v2 apps a deprecation notice, and
avoid breaking them without warning (in 3.29.1).

Arbitrarily chose the `spell_checker` integration test to reference this
empty application, let me know if you think I should bring up an
entirely new devicelab test instead.

## 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].
- [ ] 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.
- [ ] 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

---------

Co-authored-by: Gray Mackall <mackall@google.com>
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Feb 27, 2025
@flutteractionsbot
Copy link
Author

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

@github-actions github-actions bot added platform-android Android applications specifically engine flutter/engine related. See also e: labels. labels Feb 27, 2025
@gmackall gmackall requested a review from reidbaker February 27, 2025 23:21
@reidbaker reidbaker requested a review from justinmc February 28, 2025 14:30
Copy link
Contributor

@reidbaker reidbaker left a comment

Choose a reason for hiding this comment

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

Approved as a TL, @justinmc needs to approve as the release engineer.
1 change you need to make (in the cp instructions). Add a changelog entry.

But the description you added does not meet the change log guidelines
"Re-add io.flutter.app.FlutterApplication as a deprecated and empty extension on android.app.Application, to give consumers time to migrate without breaking."

Should instead be something like "#164024: Add back an empty io.flutter.app.FlutterApplication for Android apps that reference that class post v2 embedder migration."
This lists the issue and gives a one line summary which includes impacted platforms. That way users can know if it is critical for them to pick up the patch version.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

Unfortunately this will likely miss this hotfix as I've already built the engine artifacts, but otherwise LGTM 👍

There are 2 failing tests that I've rerun.

@gmackall
Copy link
Member

Approved as a TL, @justinmc needs to approve as the release engineer. 1 change you need to make (in the cp instructions). Add a changelog entry.

But the description you added does not meet the change log guidelines "Re-add io.flutter.app.FlutterApplication as a deprecated and empty extension on android.app.Application, to give consumers time to migrate without breaking."

Should instead be something like "#164024: Add back an empty io.flutter.app.FlutterApplication for Android apps that reference that class post v2 embedder migration." This lists the issue and gives a one line summary which includes impacted platforms. That way users can know if it is critical for them to pick up the patch version.

Changed to suggested

@camsim99 camsim99 added cp: approved Approved cherry-pick request and removed cp: review Cherry-picks in the review queue labels Mar 6, 2025
@camsim99
Copy link
Contributor

camsim99 commented Mar 6, 2025

Hmm looks like there are some failures :/

[+2598 ms] e: file:///b/s/w/ir/x/w/flutter/dev/integration_tests/spell_check/android/app/src/main/kotlin/com/example/sc_int_test/MainApplication.kt:7:19 Unresolved reference: app
[        ] e: file:///b/s/w/ir/x/w/flutter/dev/integration_tests/spell_check/android/app/src/main/kotlin/com/example/sc_int_test/MainApplication.kt:12:25 Unresolved reference: FlutterApplication

@gmackall
Copy link
Member

gmackall commented Mar 6, 2025

I suspect CI is hitting a bug here:

Looking at the logs for that failed build, I see logs indicating we aren't using the right version of the engine

[        ] Transforming armeabi_v7a_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:armeabi_v7a_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with JetifyTransform
[        ] Transforming armeabi_v7a_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:armeabi_v7a_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with IdentityTransform
[        ] Transforming arm64_v8a_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:arm64_v8a_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with JetifyTransform
[        ] Transforming arm64_v8a_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:arm64_v8a_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with IdentityTransform
[        ] Transforming x86_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:x86_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with JetifyTransform
[        ] Transforming x86_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:x86_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with IdentityTransform
[        ] Transforming x86_64_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:x86_64_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with JetifyTransform
[        ] Transforming x86_64_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:x86_64_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with IdentityTransform
[        ] Transforming flutter_embedding_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:flutter_embedding_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with JetifyTransform
[        ] Transforming flutter_embedding_debug-1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.jar (io.flutter:flutter_embedding_debug:1.0.0-f73bfc4522dd0bc87bbcdb4bb3088082755c5e87) with IdentityTransform

Where in particular you can see we are depending on pre built versions from commit f73bfc4522dd0bc87bbcdb4bb3088082755c5e87.

Which is wrong because this cherry pick also contains engine changes (so we should be building a version from this commit). Perhaps the engine change needs to be cherry picked separately? If so, I assume the logic that the cherry pick label invokes should also be updated?

@reidbaker reidbaker added the cp: stable cherry pick this pull request to stable release candidate branch label Mar 10, 2025
@reidbaker
Copy link
Contributor

@gmackall since this is stable you will need to add a changelog entry

@reidbaker
Copy link
Contributor

reidbaker commented Mar 10, 2025

Not sure if this or #164730 should be the one with the change log. I added an entry to the other one for you.

@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 11, 2025
@gmackall
Copy link
Member

I think the other PR will have to be the one that lands. The fix for #164739 doesn't seem to have fixed the issue with the test failure.

@reidbaker reidbaker closed this Mar 11, 2025
auto-submit bot pushed a commit that referenced this pull request Mar 11, 2025
…cation notice, and un-break projects that have not migrated (#164730)

This is just the engine portion of #164343. I.e., it does not contain the test change.

Copied from the original cherry pick pr:

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
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?

#164024

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

#164024: Add back an empty `io.flutter.app.FlutterApplication` for Android apps that reference that class post v2 embedder migration

### 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 production app (the app crashes on launch)

The class does not provide any additional funcitonality, but it class was removed without sufficient notice in the breaking changes section of the Flutter documentation. As such, consumers of this class were broken without sufficient time to migrate.

### Workaround:
Is there a workaround for this issue?

Flutter projects which need a custom `Application` can instead simply extend an `android.app.Application`. There is no reason to extend a `FlutterApplication`.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Either make a flutter app which depends on this class, or run the spell check integration tests:
```
# from the .../flutter/dev/devicelab directory
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t spell_check_test
```
Fintasys pushed a commit to Fintasys/flutter that referenced this pull request May 14, 2025
…cation notice, and un-break projects that have not migrated (flutter#164730)

This is just the engine portion of flutter#164343. I.e., it does not contain the test change.

Copied from the original cherry pick pr:

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
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?

flutter#164024

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

flutter#164024: Add back an empty `io.flutter.app.FlutterApplication` for Android apps that reference that class post v2 embedder migration

### 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 production app (the app crashes on launch)

The class does not provide any additional funcitonality, but it class was removed without sufficient notice in the breaking changes section of the Flutter documentation. As such, consumers of this class were broken without sufficient time to migrate.

### Workaround:
Is there a workaround for this issue?

Flutter projects which need a custom `Application` can instead simply extend an `android.app.Application`. There is no reason to extend a `FlutterApplication`.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

Either make a flutter app which depends on this class, or run the spell check integration tests:
```
# from the .../flutter/dev/devicelab directory
../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t spell_check_test
```
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: approved Approved cherry-pick request cp: stable cherry pick this pull request to stable release candidate branch engine flutter/engine related. See also e: labels. platform-android Android applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants