Fixes error found in rolling to google.
```
[☠] Android toolchain - develop for Android devices (the doctor check crashed)
✗ Due to an error, the doctor check did not complete. If the error message
below is not helpful, please let us know about this issue at
https://github.com/flutter/flutter/issues.
✗ type 'Null' is not a subtype of type 'String' of 'executable'
• #0 LocalProcessManager.canRun
(package:process/src/interface/local_process_manager.dart:124)
#1 getEmulatorVersion
(package:flutter_tools/src/android/android_workflow.dart:64)
#2 AndroidValidator.validateImpl
(package:flutter_tools/src/android/android_workflow.dart:200)
#3 DoctorValidator.validate
(package:flutter_tools/src/doctor_validator.dart:58)
#4 Doctor.startValidatorTasks.<anonymous closure>
(package:flutter_tools/src/doctor.dart:244)
#5 asyncGuard.<anonymous closure>
(package:flutter_tools/src/base/async_guard.dart:109)
#6 _rootRun (dart:async/zone.dart:1525)
#7 _CustomZone.run (dart:async/zone.dart:1422)
#8 _runZoned (dart:async/zone.dart:2033)
#9 runZonedGuarded (dart:async/zone.dart:2019)
#10 runZoned (dart:async/zone.dart:1952)
#11 asyncGuard (package:flutter_tools/src/base/async_guard.dart:106)
#12 Doctor.startValidatorTasks
(package:flutter_tools/src/doctor.dart:234)
#13 Doctor.diagnose (package:flutter_tools/src/doctor.dart:372)
#14 DoctorCommand.runCommand
(package:flutter_tools/src/commands/doctor.dart:59)
#15 FlutterCommand.verifyThenRunCommand
(package:flutter_tools/src/runner/flutter_command.dart:1897)
<asynchronous suspension>
#16 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1551)
<asynchronous suspension>
#17 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:154)
<asynchronous suspension>
#18 CommandRunner.runCommand (package:args/command_runner.dart:212)
<asynchronous suspension>
#19 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:501)
<asynchronous suspension>
#20 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:154)
<asynchronous suspension>
#21 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:438)
<asynchronous suspension>
#22 run.<anonymous closure>.<anonymous closure>
(package:flutter_tools/runner.dart:98)
<asynchronous suspension>
#23 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:154)
<asynchronous suspension>
#24 AppContext.run.<anonymous closure>
(package:flutter_tools/src/base/context.dart:154)
<asynchronous suspension>
#25 run (package:mobile.flutter.cli/flutter_tools.dart:106)
<asynchronous suspension>
#26 main (google3:///mobile/flutter/cli/bin/cli_usage_aot.dart:4)
```
## 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
Fixes https://github.com/flutter/flutter/issues/161443
* adds a new gradle task like `javaVersion` named `kgpVersion` that
prints the version of kgp.
* adds gradle_utils.dart method for getting kgp version
* * kgp method is moved to utilities and we attempt to use a plugin
method before reflection.
* adds methods or evaluating KGP + gradle and KGP + AGP compatibility.
* * It turns out that we have been using incompatible versions that
happen to work with the subset of kotlin we are using.
* Uses new kgp methods in flutter analyze --suggestions as part of the
existing agp/java/gradle compatibility matrix.
* adds new tests for all new functionality
* Adds comments to sections of the code I found could use them.
* Modifies flutter gallery to use a compatible version of kotlin and
update its lockfiles.
## 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 flutter_tools is run with both a local Web SDK and a local engine,
then use the Dart SDK from the local engine instead of the prebuilt Dart
SDK.
This enables testing of a local Wasm build with a locally patched Dart
SDK by setting --local-web-sdk to the Wasm engine output and
--local-engine/--local-engine-host to a local engine built with
--no-prebuilt-dart-sdk.
This PR is the dual of
https://dart-review.googlesource.com/c/sdk/+/420700 in the Dart SDK.
This PR adds support for user-defines for hooks in the root package
`pubspec.yaml`.
```yaml
hooks:
user_defines:
hook_user_defines: # package name
magic_value: 1000
```
For more design considerations see:
* https://github.com/dart-lang/native/issues/39
### Testing
This PR is covered by
`test/integration.shard/isolated/native_assets_test.dart`.
In this PR, we add a new test project
`dev/integration_tests/hook_user_defines/` and add a dependency on that
project in the mentioned test.
The integration test already covers `flutter run`, `flutter test`, and
`flutter build`.
A soft restart simply removes the previewed widget from the widget tree
for a frame before re-inserting it on the next frame. This has the
effect of re-running local initializers in `State` objects, which would
normally require a hot restart to accomplish. This reduces the number of
cases where a full hot restart of the preview environment would be
needed to pick up state-related changes.
Fixes https://github.com/flutter/flutter/issues/166450
**Updated Controls:**

**Demo:** updates a string initialized in `initState`, triggering a hot
reload. The updated string isn't rendered until the restart button is
pressed, causing the widget to be reloaded with the new state
initialized.
https://github.com/user-attachments/assets/ab4abf8a-7823-491a-ad90-f83d877600ec
<!-- start_original_pr_link -->
Reverts: flutter/flutter#166698
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jonahwilliams
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: tests are timing out in presubmit
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {jyameo}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
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
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
Closes https://github.com/flutter/flutter/issues/166648.
I think a better fix is to stop using `dart pub deps --json` and use
@sigurdm's new `.dart_tool/` vendored solution, but that can be a
follow-up change.
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
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.)
`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.
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].
This change reworks how users define previews in their code, expands the
number of valid 'functions' that can be used to create previews, and
allows for specifying a 'wrapper' function to wrap the previewed widget
with
The `WidgetPreview` class has been removed from the framework, with its
properties being added to the `Preview` annotation class instead to
remove some boilerplate from the preview declaration workflow.
Before:
```dart
@Preview()
List<WidgetPreview> previews() => <WidgetPreview>[
WidgetPreview(
name: 'Top-level preview',
child: Text('Foo'),
),
];
```
After:
```dart
@Preview(name: 'Top-level preview')
Widget previews() => Text('Foo');
```
Previews can now be defined using top-level functions, constructors and
factories which take no arguments, and static methods within classes:
Examples:
```dart
@Preview(name: 'Top-level preview')
Widget previews() => Text('Foo');
class MyWidget extends StatelessWidget {
@Preview(name: 'Constructor preview')
MyWidget.preview();
@Preview(name: 'Factory preview')
factory MyWidget.factoryPreview() => MyWidget.preview();
@Preview(name: 'Static preview')
static Widget previewStatic() => Text('Static');
@override
Widget build(BuildContext context) {
return Text('MyWidget');
}
}
```
Users can also provide a `wrapper` function with the signature `Widget
Function(Widget)` to easily wrap previewed widget with shared
bootstrapping logic.
Example:
```dart
Widget testWrapper(Widget child) {
return Provider<int>.value(
value: 42,
child: child,
);
}
@Preview(name: 'Preview with wrapper', wrapper: testWrapper)
Widget preview() {
return Text('Attributes');
}
```
Which is effectively the same as:
```dart
@Preview(name: 'Preview with wrapper')
Widget preview() {
return Provider<int>.value(
value: 42,
child: Text('Attributes'),
);
}
```
Finally, for situations where a `BuildContext` is needed, users can
return a `WidgetBuilder` from their preview function:
```dart
@Preview('Builder preview')
WidgetBuilder builderPreview() {
return (BuildContext context) {
// TODO: retrieve state from context.
return Text('Foo');
};
}
```
Also use the name "gen_snapshot" when building for Android targets
instead of appending a target architecture to the filename.
This allows flutter_tools to find the universal gen_snapshot binary when
using a locally built engine. Previously the tools would search
directories like "clang_x64" and find build outputs that may not match
the host architecture.
Moving the universal gen_snapshot binary to a separate directory avoids
conflicts with Dart's gen_snapshot binary, which is placed at the root
of the target output directory.
https://github.com/dart-lang/webdev/issues/2584
Reassemble was being called in DWDS in the injected client until
v24.3.7. Flutter tools should now instead be the one to call the service
extension. Now that it's in Flutter tools, we can also report how long
it took. Similarly, we should update analytics on various things like,
whether there was a reload rejection, how long the compile took, and
more.
Adds test to check that these analytics are being reported correctly.
## 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.
Fixes#162107
Commands that were helpful when working on this pr.
`dart dev/tools/bin/generate_gradle_lockfiles.dart
--no-gradle-generation` from flutter/flutter root.
`./gradlew test` from packages/flutter_tools/gradle.
`git add -- ":*.lockfile"` for adding only lockfile changes.
`../../bin/cache/dart-sdk/bin/dart bin/test_runner.dart test -t
android_java11_dependency_smoke_tests` from dev/devicelab
`ktlint --editorconfig=dev/bots/test/analyze-test-input/.editorconfig
--baseline=dev/bots/test/analyze-test-input/ktlint-baseline.xml
packages/flutter_tools/gradle/src/ --format` formatting kotlin code.
Need ktlint 1.5
## 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.
Ignore return value from eglinfo - it doesn't indicate failure.
Discovered when using an X11 system where Wayland is not available. It
returns 1 in this case, but the output is still valid. Confirmed by
looking at the eglinfo source - we should parse the output regardless of
what it returns.
Catch exception correctly when eglinfo is not installed.
Fixes for https://github.com/flutter/flutter/pull/163980
I have attempted to cherry pick some useful information from eglinfo
which is often requested when resolving issues with rendering.
This information is not required to compile an Flutter application, so
it is a little different to the other displayed information.
<!-- start_original_pr_link -->
Reverts: flutter/flutter#163711
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: victorsanni
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: This is closing the tree. See
https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20android_release_builds_exclude_dev_dependencies_test/889/overview
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: matanlurey
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {jonahwilliams}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
Closes https://github.com/flutter/flutter/issues/163706.
Before this PR, the macOS workflow (or, others, but only macOS had a
test) would fail because it calls `refreshPluginsList` manually, and
sometimes it would be `determineDevDependencies: null` and sometimes
`determineDevDependencies: false`.
A value of `determineDevDependencies: null` was interpreted later on as
"find dev dependencies", which is not a safe operation. The only real
change in this PR is `bool determineDevDependencies = false`, so
omitting that parameter means we don't determine dev dependencies.
Added some tests, and opted-in an integration test that was failing.
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
<!-- start_original_pr_link -->
Reverts: flutter/flutter#140783
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: This broke presubmit (which was skipped using
`added this pull request to the merge queue 2 hours ago`).
See https://github.com/flutter/flutter/issues/162715. Adding to the
merge queue manually is _not_ safe currently.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: ueman
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {bkonyi}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
This makes various Flutter version information available at runtime.
It's basically the same as executing `flutter --version`. This is
especially useful for tools like Crashlytics or Sentry (see for example
https://github.com/getsentry/sentry-dart/issues/416).
Usage example:
```dart
FlutterVersion.version; // 3.16.5
FlutterVersion.channel; // stable
FlutterVersion.gitUrl; // https://github.com/flutter/flutter.git
FlutterVersion.frameworkRevision; // 78666c8dc5
FlutterVersion.engineRevision; // 3f3e560236
FlutterVersion.dartVersion; // 3.2.3
```
This approach has prior art as seen in #134179.
Fixes https://github.com/flutter/flutter/issues/61814
<!-- *If you had to change anything in the [flutter/tests] repo, include
a link to the migration guide as per the [breaking change policy].* -->
## 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] 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/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#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/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
<!-- end_revert_body -->
Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
Closes https://github.com/flutter/flutter/issues/163706.
Before this PR, the macOS workflow (or, others, but only macOS had a
test) would fail because it calls `refreshPluginsList` manually, and
sometimes it would be `determineDevDependencies: null` and sometimes
`determineDevDependencies: false`.
A value of `determineDevDependencies: null` was interpreted later on as
"find dev dependencies", which is not a safe operation. The only real
change in this PR is `bool determineDevDependencies = false`, so
omitting that parameter means we don't determine dev dependencies.
Added some tests, and opted-in an integration test that was failing.
Tests under the `general.shard` have a 2000ms timeout and these tests
write to the real file system and watch directories for changes. This
can be slow on heavily loaded machines and cause flaky failures.
https://github.com/flutter/flutter/issues/163329
Tested locally to ensure pressing 'd' in a running `flutter run` session
detaches and leaves Chrome open. Hitting 'q' or stopping with a signal
both terminate Chrome as expected.
## 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.
---------
Co-authored-by: Nate Biggs <natebiggs@google.com>
If the Flutter SDK is updated we need to invalidate the widget preview
scaffold project to, at the very least, rebuild the precompiled
application. Similarly, if the root project's `pubspec.yaml` is updated,
the scaffold project's pubspec should be regenerated.
This change adds a `preview_manifest.json` to the scaffold project which
contains information related to:
- The manifest schema version
- The Dart SDK version the project was generated with
- The last known hash of the root project's pubspec.yaml
This information is used to determine whether or not the scaffold
project needs to be regenerated or the scaffold pubspec needs to be
updated to reflect changes to the root project's pubspec since the
previewer was last run.
Closes https://github.com/flutter/flutter/issues/162399.
Closes https://github.com/flutter/flutter/issues/163272.
`refreshPluginsList` is commonly called in iOS/macOS apps, more times
than you expect (and load bearing);
https://github.com/flutter/flutter/issues/157391.
With `--explicit-package-dependencies`, we no longer write (or compare)
the output of `.flutter-plugins`. The iOS/macOS workflows required `pod
install` output to be invalidated when plugins when change, but the
logic that was being used to see if plugins changed _only_ worked for
the `.flutter-plugins` file format.
In the original code:
```txt
# oldPluginsFileStringContent
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"/Users/matanl/Developer/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"ios_objc_cocoapods_plugin","path":"/var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/swift_package_manager_enabled.XrEWXS/ios_objc_cocoapods_plugin/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"integration_test","path":"/Users/matanl/Developer/flutter/packages/integration_test/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"ios_objc_cocoapods_plugin","dependencies":[]}],"date_created":"2025-02-13 17:01:11.023097","version":"3.30.0-1.0.pre.163","swift_package_manager_enabled":{"ios":true,"macos":false}}
# pluginsMap
{ios: [{name: integration_test, path: /Users/matanl/Developer/flutter/packages/integration_test/, native_build: true, dependencies: [], dev_dependency: false}, {name: ios_objc_cocoapods_plugin, path: /var/folders/qw/qw_3qd1x4kz5w975jhdq4k58007b7h/T/swift_package_manager_enabled.XrEWXS/ios_objc_cocoapods_plugin/, native_build: true, dependencies: [], dev_dependency: false}], android: [{name: integration_test, path: /Users/matanl/Developer/flutter/packages/integration_test/, native_build: true, dependencies: [], dev_dependency: false}], macos: [], linux: [], windows: [], web: []}
```
As you can see, `pluginsChanged =
oldPluginsFileStringContent.contains(pluginsMap.toString());` was
_always_ `false`, but we never knew because we'd always just fall back
to using the `.flutter-plugins` content comparison (which always
worked).
I added a test as well.
This also appears to fix
https://github.com/flutter/flutter/issues/162399.
/cc @jmagman @jonahwilliams
`flutter widget-preview start --web` will cause the widget preview
scaffold to be run as a Flutter Web application using experimental hot
reload support. This will eventually be the default, with the desktop
environment being put behind a flag for use as a fallback under the
assumption that the desktop environment will be removed in the future.
- Adds better instructions for hot reload (if using the right flags),
hot restart, quitting, clearing, and more. These were already being
printed when using the VM, so this aligns with that.
- Adds an extra parameter for `CommandHelp` to `ResidentRunner` so
`ResidentWebRunner` can pass a version of it that uses its separate
logger and not `globals`. In order to support this, classes up the stack
also provide a `Terminal`, `Platform`, and `OutputPreferences`.
- Fixes up use of `globals` from an earlier change to implement hot
reload to use the logger instead. Same with `globals.platform`.
- Adds tests to check that only hot restart is printed when not using
the extra front-end flags, and both hot restart and hot reload is
printed when you are.
## 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.
I happened to run into this while chasing other bugs, and noticed
`.flutter-plugins-dependencies` is omitted.
I am guessing this is probably quite stale, but something something
[Chesterton's
fence](https://en.wiktionary.org/wiki/Chesterton%27s_fence), and added
tests.
- Delete code paths that handle screenshots for the HTML renderer
- Delete artifact enums for the HTML/AUTO renderers (and all their
usages).
- Remove HTML/AUTO renderers warnings.
- Delete the HTML/AUTO renderer enums (and all their usages).
- Delete tests for all the above.
`generateLocalizations` should fail (`flutter gen-l10n`) if `flutter:
generate:` does not exist.
The previous logic was faulty, because it was totally possible to
opt-out of synthetic packages (i.e. in a `l10n.yaml` file), but still
not be specifying `flutter: generate:`, which I _believe_ is supposed to
still be an error.
This came up in https://github.com/flutter/flutter/pull/160289 as
`flutter config --explicit-package-dependencies` is enabled by default,
as the error is no longer thrown. Made a few other small test
forward-fixes that otherwise would break with the switch (but are
expected) as well.
Closes https://github.com/flutter/flutter/issues/162846.
At HEAD, including before this PR, it was impossible to use, or pass-in,
an unsound null-safety mode, but we still had code checking for it, and
reported analytics (I think? Some of these are `package:usage` specific
which is defunct).
This PR eradicates the otherwise unused code.
Towards https://github.com/flutter/flutter/issues/162846.
Removes all of the unsound host artifacts, and then uses their name for
the sound artifacts.
That is, for something like `webPlatformDDCKernelDill`, this PR:
- Changes the web GN builders to only emit the sound SDK, without the
`-sound` suffixes
- Deletes `webPlatformDDCKernelDill` and all usages of it (implicitly
unsound, and unused).
- Renames `webPlatformDDCKernelSoundDill` to `webPlatformDDCKernelDill`.
No user impact expected, as there was no way to use the unsound
artifacts from the Flutter tool.
With this change, `flutter widget-preview start` will launch a working
widget preview environment that can render previews from a target
project.
Also fixes an issue where `--offline` wasn't being respected by some pub
operations.
Rather than ask users to pass the complicated and long string
`--extra-front-end-options=--dartdevc-canary,--dartdevc-module-format=ddc`
we want a simpler flag to enable the new DDC module system/hot reload.
Technically this flag enables the new module system, not necessarily hot
reload directly. But we only expect people to use the flag to enable hot
reload so I've chosen the name based on that.
---------
Co-authored-by: Nate Biggs <natebiggs@google.com>