Impacted Users: iOS and macOS Flutter developers
Impact Description: iOS/macOS workflows may not behave as expected due to missing dev dependencies.
Workaround: Yes, run in debug mode, such as `flutter build ios --debug --config-only`
Risk: low
Test Coverage: yes
Validation Steps: Run `flutter build ios` on a project with dev dependencies and should see them in the GeneratedPluginRegistrant
### Issue Link:
https://github.com/dart-lang/sdk/issues/60851
### Changelog Description:
Fixes unhandled exception on application shutdown in the debug adapter used by IDEs.
### Impact Description:
The Debug Adapter (DAP) could crash if it is waiting on specific RPCs from a target application while the application is shutting down.
### Workaround:
None.
### 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:
This bug is extremely hard to reproduce reliably. Catching `RPCError` and checking for the correct error code related to the VM service disappearing is simple and low risk.
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?
https://github.com/flutter/flutter/issues/169252
### 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
Fixes a build failure on Android for app bundles when setting debug symbol level to `FULL` and using release mode.
### 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)
Flutter fails to build an AAB in release mode.
### Workaround:
Is there a workaround for this issue?
No, besides not using this symbol level.
### 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?
This linked issue has easy to follow repro steps for the original issue, which also function as validation steps that the issue is fixed.
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?
https://github.com/flutter/flutter/issues/163591
### Changelog Description:
Normalizes file paths in every depfile, especially on Windows. It eliminates the inconsistency that can occur when other codes find the file paths are different and produce unexpected results.
### Impact Description:
The most noticeable impact so far is that people are unable to build flavored Android packages on Windows repeatedly until the next clean.
### Workaround:
Is there a workaround for this issue?
The workaround is to manually patch the project's gradle script: https://github.com/flutter/flutter/issues/163591#issuecomment-2887039609
From my experience, the patch is not always working and is hard to maintain.
### 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?
Follow the *steps to reproduce* section in https://github.com/flutter/flutter/issues/163591#issue-2862606263.
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?
https://github.com/flutter/flutter/pull/169602
### 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
Fixes a bug where `appFlavor` is `null` when being run with `flutter test` or being hot-restarted.
### 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)
Cannot reliably use `appFlavor` without rebuilding the app from scratch.
### Workaround:
Is there a workaround for this issue?
Do not use hot restart, do not use `flutter test`.
### 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?
Automated test coverage.
Fixes https://github.com/flutter/flutter/issues/156793
### Issue Link:
https://github.com/flutter/flutter/issues/156793
### Changelog Description:
Fix flaky crash when targeting web applications via IDEs using the DAP.
### Impact Description:
The `flutter debug-adapter` process started by IDEs can crash when requesting isolate information from a Flutter web application that has disposed its isolate (i.e., at shutdown or due to a hot restart).
This is the top crasher for `flutter_tools`, accounting for ~66% of all crashes for 3.32.0.
### Workaround:
Is there a workaround for this issue?
No.
### Risk:
This CP is low risk as only additional exception handling was added to the DAP logic in `package:dds` (see https://dart-review.googlesource.com/c/sdk/+/431060) to handle the specific case outlined in the issue.
### Test Coverage:
This issue is difficult to reproduce without injecting test-only code via custom VM service RPCs across multiple repositories. Testing was done manually with this approach, but the testing code is not committed.
### Validation Steps:
IDE extensions don't crash when interacting with Flutter Web applications during hot restart / application shutdown.
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?
https://github.com/flutter/flutter/pull/169319
### 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
Fixed a bug where the `flutter` tool crash reporting did not include what plugins were being used by the current project.
### 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)
Tool crash reports are missing plugins in use.
### Workaround:
Is there a workaround for this issue?
Yes, `flutter config --no-explicit-package-dependencies`, but that has other project impact, or copying and pasting the plugins manually.
### 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?
See unit tests.
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?
There was no associated issue, but the problem is that https://github.com/flutter/flutter/pull/166727 broke Flutter Android builds on apps that use plugins with AGP versions less than 8.2.
### 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
Fixes Flutter Android builds for apps which use plugins with old Android Gradle Plugin versions.
### 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 impact is a crash in the build process.
### Workaround:
Is there a workaround for this issue?
No
### 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?
Build an app that uses AGP < 8.2.
* Updated Dart revision to [`e7f2f0556e3e57acb60749467e54f9a44b2bfc76`](http://goto.google.com/dart-hash/e7f2f0556e3e57acb60749467e54f9a44b2bfc76) (`3.8.0-278.4.beta`).
* ~Ran `gclient sync -D` and `tools/dart/create_updated_flutter_deps.py` (nothing was updated)~ ran wrong command
* Ran `gclient sync -D` and `tools/dart/create_updated_flutter_deps.py -f <flutter_DEPS_file_path>` (Dart style revision was updated)
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?
< Replace with issue link here >
### 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
< Replace with changelog description here >
### 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)
< Replace with impact description here >
### Workaround:
Is there a workaround for this issue?
< Replace with workaround here >
### 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?
< Replace with validation steps here >
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?
https://github.com/flutter/flutter/issues/167887
### 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
N/A
### 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)
Tool crashes while running WASM web apps
### Workaround:
Is there a workaround for this issue?
No
### 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?
See attached issue
This will eventually be used as the main communication channel between
the widget preview scaffold, the Flutter tool, and other developer
tooling (e.g., IDEs).
Fixes#166417
Bumping the warn agp version from 7.3 (sept 2022) to 8.3 (feb 2024).
This is because we will likely need to depend on apis available in the
newer versions of AGP as part of our work to migrate to the
public/stable agp api. Warning will not break customers but starts the
clock on being able to bump error version.
I would have also bumped the error version but want to get this in
before the 3.32 cut next monday and adding errors can cause review
delay.
## 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.
- [ ] 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.
---------
Co-authored-by: Jackson Gardner <jacksongardner@google.com>
## 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 `///`).
- [ ] 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.
By default, `CoverageCollector.libraryNames` was being set to the name
of the current `FlutterProject`. This means that only tests in the
current project are included in the coverage report. So if the project
is a workspace, tests in its subprojects were being excluded. I've
changed it so that it also allows tests that are part of any of the
subprojects.
Fixes#159390
Adds a new `widget_preview_scaffold.shard` directory which contains a
hydrated `widget_preview_scaffold` template. This will allow for us to
write widget tests against the widgets defined in the templates.
This PR doesn't add any widget tests and is only adding the ability to
run these tests in follow up changes.
Fixes https://github.com/flutter/flutter/issues/166416
Updating the dart-lang/native dependencies to the ones published today.
No functional changes, but `CodeAsset` does not expose an `architecture`
and `os ` anymore (https://github.com/dart-lang/native/issues/2127).
Instead these should be taken from what is passed in for the
`CodeConfig`. This PR refactors the `DartBuildResult` to carry around
the `Target` with `CodeAsset`s as `FlutterCodeAsset`s.
(This PR avoid refactoring relevant code due to
https://github.com/flutter/flutter/pull/164094 already refactoring this
code.)
Unfortunately `10_google3_bug.yml` comes before `2_bug.yml`.
This changes the name (slightly) of the issue templates based on the
instructions from GitHub on what to do when you have 10+ issue templates
(as a side-note: I wonder if we need/still use umbrella bugs for the
feature tracker, or two types of performance bugs)
In the case of a multi-app scenario, different applications may store
files in different locations. In order to avoid reloading files that
were unchanged, a suffix can be added to indicate which "version" of
this file we're loading. Even if it has a different path, because the id
and "version" (which is URL(...).search) are the same, the file would
not be reloaded.
With Flutter tools, this scenario doesn't occur. The running application
ultimately does not need to worry about the same file in different
locations.
The benefit to avoid this caching is that the user only ever sees one
copy of every file, which is the latest version, instead of the current
behavior where a "gen=N" suffix is added to a newer version.
Note that this is unrelated to the XHR or its headers or any of its
caching mechanisms. The XHR is only used to fetch the *list* of changed
files, not the files themselves. The files get loaded as part of the
`appendChild` call.
https://github.com/flutter/flutter/issues/166294
## 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 `///`).
- [ ] 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.
Graph [stolen from Barteks
comment](https://github.com/flutter/flutter/pull/161352#issuecomment-2611252732)
documenting the existing (pre pr) state:
```mermaid
graph TD;
flutter.groovy -- import --> native_plugin_loader.groovy;
flutter.groovy -- import --> BaseApplicationNameHandler.kt;
module_plugin_loader.groovy -- "ext" --> native_plugin_loader.groovy;
app_plugin_loader.groovy -- import --> native_plugin_loader.groovy;
include_flutter.groovy -- "apply from: " --> module_plugin_loader.groovy;
```
1. Converts the `app_plugin_loader.groovy` to kotlin source.
2. Converts the `module_plugin_loader.groovy` to kotlin script. This
can't be changed to kotlin source yet, as we will need to instruct users
to make a change to their host app-level gradle files before we can turn
down script application of this separate gradle plugin. This is a
breaking change, and will need a quarter at least of notice.
3. Unfortunately, the main Flutter Gradle plugin depends on being able
to call methods of the `native_plugin_loader`, which we could do in
groovy via wacky dynamic behavior, calling across the compiled
plugin->script plugin barrier. We can't do this in Kotlin source, and we
also can't fully convert `native_plugin_loader` to kotlin source yet
because of (2), so I've added a `NativePluginLoaderReflectionBridge`
that allows us to access the methods in the
`native_plugin_loader.gradle.kts` from the Kotlin source files, calling
across the compiled plugin->script plugin barrier as we were before.
The plan here is
1. to follow up by adding a converted `native_plugin_loader.gradle.kts`
in Kotlin source, and migrating all paths but the host-app using a
module-as-source to use the converted approach (but not deleting the old
way)
2. maintaining both ways for a release or two, with the script
application printing a message notifying users to update to the
non-script based application of the `module_plugin_loader`.
3. Then we can delete the script based apply, and also the reflection
bridge.
## 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 `///`).
- [ ] 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
---------
Co-authored-by: Gray Mackall <mackall@google.com>
`BuildWebCommand` was accessing the value of `target` directly from the
argument parser rather than using the `targetFile` getter defined on
`FlutterCommand` which handles file paths provided in the positional
argument list.
Fixes https://github.com/flutter/flutter/issues/136830.
- **Inital conversion and single test case**
- **Task registered with name**
- **Test can handle multiple variants**
- **configuration for baseOutput setup**
- **Test passing**
- **formatting**
- **Use constant with upppercase**
- **Replace flutter.groovy version of
addTasksForOutputsAppLinkSettings**
Fixes#164393
Helpful commands:
`
JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home/
./gradlew test --info --tests
"com.flutter.gradle.FlutterPluginUtilsTest"` from
packages/flutter_tools/gradle
`flutter test
test/integration.shard/android_gradle_outputs_app_link_settings_test.dart`
from packages/flutter_tools
## 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.
There's currently a lot of code that handles RPC Errors that contain the
text "Service connection disposed" because the error originally did not
have a unique error code.
A new error code was added in
https://dart-review.googlesource.com/c/sdk/+/381501 but it's not
currently used because it won't be caught by existing code.
This change updates all places that check for this text, and now also
handle the new error code in preperation for the code changing in
future.
See https://github.com/flutter/flutter/issues/153471
cc @bkonyi
## 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.
Issue listed, but this change does not directly fix it, it just prepares
for a related future change that will simplify handling these errors
without string checks
- [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].