-
Notifications
You must be signed in to change notification settings - Fork 29.8k
[CP-stable]Add empty io.flutter.app.FlutterApplication to give deprecation notice, and un-break projects that have not migrated
#164343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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>
|
@gmackall please fill out the PR description above, afterwards the release team will review this request. |
There was a problem hiding this 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.
justinmc
left a comment
There was a problem hiding this 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.
Changed to suggested |
|
Hmm looks like there are some failures :/ |
|
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 Where in particular you can see we are depending on pre built versions from commit 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? |
…0066ea13175b2bae7fed070dbb
|
@gmackall since this is stable you will need to add a changelog entry |
|
Not sure if this or #164730 should be the one with the change log. I added an entry to the other one for you. |
…0066ea13175b2bae7fed070dbb
|
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. |
…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 ```
…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 ```
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.FlutterApplicationfor Android apps that reference that class post v2 embedder migrationImpact 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
Applicationcan instead simply extend anandroid.app.Application. There is no reason to extend aFlutterApplication.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: