Daco Harkes
534b250a56
[native assets] Graduate to preview ( #169194 )
...
This PR enables native assets on the main and dev channel by default,
and make native assets available on the beta channel.
This PR removes the flag from invocations.
The helper packages (`package:hooks` and `package:code_assets`) will
stay 0.x for now, until the SDK constraint can be bumped to a beta
release and we're happy with the Dart API.
Corresponding Dart CL:
https://dart-review.googlesource.com/c/sdk/+/429920
Issue:
* https://github.com/flutter/flutter/issues/129757
Project: https://github.com/orgs/dart-lang/projects/99/
2025-05-21 16:54:42 +00:00
Matan Lurey
5458f42782
Remove isExplicitPackageDependenciesEnabled: true
, it is the default. ( #169156 )
...
This flag has been enabled by default for quite some time in `master`,
and in the current `stable`.
This is the first of many PRs to get rid of the flag and the deprecated
code it is guarding.
2025-05-21 04:26:10 +00:00
Kevin Moore
b3130ee78e
[flutter_tool] Remove unused environment flags in JS compiler ( #169097 )
...
Removes things left over from refactoring in
5a9fa1e7bf
2025-05-20 20:14:09 +00:00
Sigurd Meldgaard
b23840d044
Only bundle assets and plugins from transitive closure of dependencies ( #160443 )
...
Fixes https://github.com/dart-lang/pub/issues/4486
Fixes https://github.com/dart-lang/pub/issues/4473
Fixes https://github.com/flutter/flutter/issues/79261
Fixes https://github.com/flutter/flutter/issues/160142
Fixes https://github.com/flutter/flutter/issues/155242
Use the new `.dart_tool/package_graph.json` file to compute the
dependency graph. Determining
* which are transitive dependencies of the main app's direct and
dev-dependencies, (not other packages from the workspace)
* which of these are only in the transitive set of the direct
dependencies
Bundles assets from dev_dependencies when running `flutter test`, but
not otherwise.
2025-05-19 15:30:58 +00:00
Ben Konyi
4baf4b4d1c
[ Widget Preview ] Refactor @Preview()
detection and code generation ( #168307 )
...
This change makes the detection of `@Preview(...)` annotations more
robust by converting the analyzer AST directly to generated code rather
than simply copying and pasting the original source. This allows for
proper handling of the following cases WRT import prefixing:
- The use of `const`
- String interpolation
- Other uses of constant variables in non-trivial contexts
- Etc.
2025-05-16 19:59:25 +00:00
Parker Lougheed
77ba015769
[tool] Fix broken comment references and code spans in doc comments ( #168498 )
...
Enables the `comment_references` and `unintended_html_in_doc_comment`
lints in `packages/flutter_tool`, then fixes each of the triggering
cases.
This PR is test exempt due to only affecting documentation comments.
## 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.
[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
2025-05-15 21:14:26 +00:00
Ben Konyi
3d0c18b550
[ Widget Preview ] Add typedefs, replace height
and width
with size
( #168063 )
...
Addresses some comments from
[flutter.dev/go/widget-previews-architecture](flutter.dev/go/widget-previews-architecture).
2025-05-05 15:51:14 +00:00
August
45f431fde9
feat: Arbitrary format options for localizations generation ( #102983 ) ( #167029 )
...
Migration of Localization Generation [Option
1](https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source#migration-guide )
breaks `dart format . --set-exit-if-changed` checks (as commonly used in
pipelines), as the generated file does not comply the `dart format`
rules.
This PR:
- Formats the generated localization files by default
- In contrast to [this
comment](https://github.com/flutter/flutter/pull/109171#issuecomment-1209710029 )
I don't see it as breaking as the files are generated dynamically on
every change and there's no need in migrating them. Also any tests
should not fail as either the format was done manually afterwards
anyways, or the formatting was not checked at all (in third party apps /
libraries) as the output had not a correct format in any use case of
checking via `dart format`.
- Add tests for `no-format`
- Add option to add arbitrary arguments to the `dart format` command to
allow customized formatting
Closes #167982
Contributes to:
https://github.com/flutter/flutter/issues/102983#issuecomment-2707419112
*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] 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
2025-04-30 02:56:28 +00:00
Matan Lurey
90d18c6097
--use-existing-app
defaults to --keep-app-running
if not specified. (#167742 )
...
Closes https://github.com/flutter/flutter/issues/166755 .
2025-04-28 14:33:24 +00:00
Srivats Venkataraman
5fd17bccff
Changes message when web folder is not present ( #165084 )
...
This PR addresses: https://github.com/flutter/flutter/issues/164921
The old message for when the web folder wasnt present and a build for
web command was executed the following message was thrown:
```Missing index.html.```
The new message is going to be:
```Run flutter create . --platforms web```
<img width="1087" alt="Screenshot 2025-03-12 at 5 16 15 PM"
src="https://github.com/user-attachments/assets/0676083e-03a5-4bea-afac-8321eb9358f9 "
/>
<img width="1440" alt="Screenshot 2025-03-12 at 5 33 15 PM"
src="https://github.com/user-attachments/assets/4eab879c-23d8-4bd0-b08a-a5728009a943 "
/>
## 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
2025-04-28 13:19:00 +00:00
Chris Bracken
09d4dabd6d
iOS: Update minimum iOS version to 13.0 ( #167737 )
...
This updates the Flutter minimum iOS version from 12.0 to 13.0, adds a
migrator for existing apps, and updates our own examples, tests, and
benchmark apps to 13.0. A follow-up patch will drop iOS 13 `@available`
checks in the embedder.
This is required in order to use Swift in the embedder and not need to
bundle the Swift runtime libs in every app that uses Flutter. Swift
stable ABI
As of March 2025, usage of iOS is well below 1%, see example public
usage data here:
https://telemetrydeck.com/survey/apple/iOS/majorSystemVersions/
This patch makes the following changes:
1. Updates ios_deployment_target from 12.0 to 13.0.
2. Changes templates to `IPHONEOS_DEPLOYMENT_TARGET`,
`MinimumOSVersion`, and Podfile `platform :ios` to 12.0.
3. Adds migrator for Podfile part to migrate `platform :ios, '11.0'` ->
`platform :ios, '12.0'`
4. Compiles with `-miphoneos-version-min=12.0`
5. Runs the migrator on all example apps and integration tests.
6. Updates examples, tests to iOS 13 deployment target
It also updates `verify_exported.dart`:
* iOS 13 introduces stricter separation of const and non-const global
symbols. Previously, these were declared in the Mach-O `__DATA` section
which may be mapped read-write, but now they're in a dedicated
`__DATA_CONST` section which is mapped read-only. This adds
`(__DATA_CONST,__const)` to the allowlist with the same enforcement on
exported symbol naming as before.
See also (ios_deployment_target):
* https://github.com/flutter/buildroot/pull/808
* https://github.com/flutter/buildroot/pull/574
See also (template, migrator):
* https://github.com/flutter/flutter/pull/62902
* https://github.com/flutter/flutter/pull/85174
* https://github.com/flutter/flutter/pull/101963
* https://github.com/flutter/flutter/pull/140478
Issue: https://github.com/flutter/flutter/issues/167735
## 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
2025-04-24 20:15:13 +00:00
Loïc Sharma
127faefdf2
Fix casing of error when Dart compiler is interrupted ( #167520 )
...
You see this error if you do a well timed `Ctrl+C` during a `flutter
run`
2025-04-22 20:50:19 +00:00
Victoria Ashworth
ecabb1a052
Hide error on mDNS registration failure and print warning in flutter attach ( #166782 )
...
Publishing an mDNS service stopped working on macOS 15.4 for the iOS
Simulator. `DNSServiceRegister` always returns a callback with error
code `kDNSServiceErr_PolicyDenied`, as if the user had rejected the
permissions popup (except no popup is ever shown). mDNS is used to
discover the Dart VM when running `flutter attach`.
This PR does not display the error message when `DNSServiceRegister`
fails for iOS Simulators. Instead, it prints a warning if `flutter
attach` takes too long with instructions to either use `--debug-url` or
to run `flutter attach` before running the app.
If `DNSServiceRegister` works again in a future macOS update, mDNS will
continue to work the way it did previously.
Workaround for https://github.com/flutter/flutter/issues/166333 .
## 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
2025-04-17 14:20:23 +00:00
Ben Konyi
3595e7dad0
[ Widget Preview ] Add support for theme
and brightness
properties on Preview
( #167001 )
...
The `theme` parameter of `Preview(...)` allows for developers to provide
a callback that returns a `PreviewThemeData` instance which can contain
theming data for Material and Cupertino widgets in both light and dark
modes. The provided theme data will be injected into the widget tree and
applied to the previewed widget.
The `brightness` parameter allows for developers to specify an initial
brightness setting (e.g., light vs dark mode) for the previewed widget.
If not provided, the current system default is used.
A new button has also been added to each widget preview card that allows
for toggling between light and dark mode for individual previews.
**Demo:**
https://github.com/user-attachments/assets/f0a4a3bc-25d2-49b0-a5f6-9149eccfc1d4
Fixes https://github.com/flutter/flutter/issues/166436
Fixes https://github.com/flutter/flutter/issues/166275
Fixes https://github.com/flutter/flutter/issues/166279
Fixes https://github.com/flutter/flutter/issues/166437
2025-04-15 17:51:40 +00:00
Ben Konyi
ac6ab205b5
Reland "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) ( #166698 )" ( #166877 )
...
This reverts commit 059326d49d
and updates
the `widget-preview` command to always spawn the previewer using a local
canvaskit binary.
Fixes https://github.com/flutter/flutter/issues/166865
2025-04-11 14:55:29 +00:00
auto-submit[bot]
059326d49d
Reverts "[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) ( #166698 )" ( #166866 )
...
<!-- 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>
2025-04-09 18:11:18 +00:00
Ben Konyi
30e53b0d9c
[ Widget Preview ] Add initial support for communications over the Dart Tooling Daemon (DTD) ( #166698 )
...
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
2025-04-08 18:10:50 +00:00
flutter-pub-roller-bot
cc556aecae
Roll pub packages ( #166503 )
...
This PR was generated by `flutter update-packages --force-upgrade`.
---------
Co-authored-by: Ben Konyi <bkonyi@google.com>
2025-04-08 00:41:20 +00:00
Liam Appelbe
09367adce2
Make coverage collection aware of workspaces ( #166389 )
...
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
2025-04-06 22:27:08 +00:00
Nils Reichardt
70cd54c3fd
Add --ignore-timeouts
flag for flutter test
command ( #164437 )
...
As in #105913 described, running integration tests of your app often
times out. The issue for this is that the `test` package has their own
timeout for loading the test suite:
db8cf09150/pkgs/test_core/lib/src/runner/load_suite.dart (L23-L29)
This timeout is not configurable. However, you can bypass this timeout
using `--ignore-timeouts` when running `dart test`. This PR adds the
`--ignore-timeouts` flag to the `flutter test` command and passes it to
the `test` package.
Adding the flag would be the easiest fix for #105913 . I will later add
documentation to the integration test docs, that passing this flag will
fix the timeout issue. Otherwise, we would need to make the load test
suite timeout configurable in the `test` package and then somehow set it
in the `flutter test` command.
Fixes #105913

A screenshot of running `flutter test integration_test
--ignore-timeouts` which surpasses the previous timeout of 12 minutes.
## 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
2025-04-01 14:17:20 +00:00
Ben Konyi
0db5aaf8d7
[ Tool ] Correctly select entrypoint target for web build from positional argument list ( #166260 )
...
`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 .
2025-03-31 17:23:58 +00:00
Ben Konyi
3efb8cc359
[ Widget Preview ] Display an error widget when an exception is thrown while defining the widget tree ( #166005 )
...
Example exception thrown trying to invoke `Directory.current` in a
widget constructor:

2025-03-27 18:47:51 +00:00
Danny Tuppeny
53b87635b0
[flutter_tool] Handle RPCErrorKind.kConnectionDisposed ( #164299 )
...
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].
2025-03-27 08:51:38 +00:00
Ben Konyi
41c427c6de
[ Widget Preview ] Remove WidgetPreview
in favor of using annotation properties ( #165500 )
...
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');
};
}
```
2025-03-22 01:35:36 +00:00
Matan Lurey
71d50a1616
Start using bin/cache/engine.{stamp|realm}
instead of bin/internal/engine.{realm|version}
. ( #164352 )
...
Towards https://github.com/flutter/flutter/issues/164315 .
See also:
https://github.com/flutter/flutter/blob/master/docs/tool/Engine-artifacts.md .
There are more usages in `flutter/flutter`, but some will require more
specialized review (i.e. from release folks, or the Dart SDK team), so
I'll split those off.
~~Requires https://github.com/flutter/flutter/pull/164317 to merge
first.~~ ✅
2025-03-02 00:54:33 +00:00
Sigurd Meldgaard
45b21ec3bb
Refactor writing of package config in tests ( #163734 )
...
Seems like each test had its own way of doing this.
Extracted from https://github.com/flutter/flutter/pull/160443
2025-02-28 08:51:59 +00:00
Matan Lurey
d8856b9e50
Remove the last vestiges of null-unsafety in flutter_tools
. ( #164026 )
...
The internal code using this was deleted in `cl/730558889`.
2025-02-27 16:31:22 +00:00
Jonas Uekötter
a8d1b62382
Reland "Make Flutter version information accessible at runtime ( #140783 )" ( #163761 )
...
Reverts https://github.com/flutter/flutter/pull/163753
Relands https://github.com/flutter/flutter/pull/140783
Original PR description below
------
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
2025-02-24 20:17:08 +00:00
Brandon DeRosier
911aa7547e
Remove legacy scenec stuff from flutter_tool ( #163569 )
...
o7
Removes the legacy scenec logic from flutter_tool. We removed scenec
from the engine/shipped artifacts long ago. Originally added in
https://github.com/flutter/flutter/pull/118157 . This has since been
replaced by
[flutter_scene_importer](https://pub.dev/packages/flutter_scene_importer/versions )!
2025-02-21 17:41:02 +00:00
auto-submit[bot]
fc9f5b0a54
Reverts "Make Flutter version information accessible at runtime ( #140783 )" ( #163753 )
...
<!-- 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>
2025-02-20 18:00:48 +00:00
Jonas Uekötter
ae100a265b
Make Flutter version information accessible at runtime ( #140783 )
...
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
---------
Co-authored-by: Greg Price <gnprice@gmail.com>
2025-02-20 15:23:31 +00:00
Ben Konyi
9c7e2c2563
[ Widget Preview ] Move preview_detector_test.dart
from general.shard
to commands.shard
( #163619 )
...
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.
2025-02-19 22:53:35 +00:00
Srujan Gaddam
9393aae393
Align web terminal messages with the VM ( #163268 )
...
- 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.
2025-02-14 19:57:53 +00:00
Mouad Debbar
5fa05ab6df
[web] Cleanup everything HTML from the flutter tool and test harness ( #162836 )
...
- 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.
2025-02-13 20:53:37 +00:00
Matan Lurey
063f80d40f
Finish removing null-safety
mode, checks, and reporting. ( #163153 )
...
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.
2025-02-12 21:52:02 +00:00
Matan Lurey
b728c4c06a
Remove unsound artifacts, remove *Sound
qualifier. ( #163015 )
...
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.
2025-02-12 02:40:18 +00:00
Jonah Williams
33a4c95de0
[flutter_tools] remove SkSL bundling and dump skp on compilation. ( #162849 )
...
SkSL precompilation was only ever beneficial for iOS. For other
platforms, we recommended against it as Skia generated shaders per
target architecture which could be invalid on other devices. It is no
longer possible to use Skia on iOS.
Delete all Skia shader bundling logic.
Fixes https://github.com/flutter/flutter/issues/80091
2025-02-10 16:54:02 +00:00
Matan Lurey
6cca066620
Revert the preview-device
feature, tests, and code that only existed for it. ( #162835 )
...
Closes https://github.com/flutter/flutter/issues/162693 .
Fortunately due to the power of `git`, it will live forever 🫡
2025-02-08 01:03:25 +00:00
Michael Goderbauer
c783ce2344
Remove outdated ignores ( #162773 )
...
Powered by the new and amazing `unnecessary_ignore` lint.
We're not enabling this lint by default because being able to
temporarily use ignores that don't ignore anything is a powerful tool to
enable migrations. We should turn this lint on locally periodically,
though, and clean up all outdated ignores.
2025-02-06 18:40:25 +00:00
Ben Konyi
0889cca518
[ Widget Preview ] Add support for building and launching the widget preview scaffold ( #162326 )
...
This also wires up the preview detector to trigger hot reloads when new
previews are detected or previews are removed.
Note: while this change results in lib/generated_preview.dart being
generated and updated, it's not currently referenced by lib/main.dart
and the preview environment will render a black screen.
---------
Co-authored-by: Andrew Kolos <andrewrkolos@gmail.com>
2025-02-05 20:44:56 +00:00
Andrew Kolos
db9591cfbf
delete Usage
in doctor tests ( #162646 )
...
Tiny delete op. Toward https://github.com/flutter/flutter/issues/150575
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
2025-02-04 18:32:06 +00:00
Andrew Kolos
53a21710cf
delete references to Usage
in config_test.dart ( #162648 )
...
Fixes https://github.com/flutter/flutter/issues/162413 . Toward
https://github.com/flutter/flutter/issues/150575
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
2025-02-04 18:32:06 +00:00
Andrew Kolos
2f2bda3504
[reland] delete FlutterCommand.usageValues
( #162550 )
...
Relands https://github.com/flutter/flutter/pull/162468
The original PR broke g3 postsubmit, because there was an override of
`FlutterCommand.usageValues`. This was since deleted.
## Original PR description
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
2025-02-03 20:26:04 +00:00
Ben Konyi
de872dd864
[ Tool ] Remove use of globals from widget-preview commands ( #162522 )
2025-01-31 19:17:45 +00:00
auto-submit[bot]
1902fb27a6
Reverts "Delete FlutterCommand.usageValues
( #162468 )" ( #162494 )
...
<!-- start_original_pr_link -->
Reverts: flutter/flutter#162468
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: jtmcdole
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: tree broken (see Mac_arm64 module_test_ios)
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: andrewkolos
<!-- end_original_pr_author -->
<!-- start_reviewers -->
Reviewed By: {bkonyi}
<!-- end_reviewers -->
<!-- start_revert_body -->
This change reverts the following previous change:
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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] <flutter-engprod-team@google.com>
2025-01-31 01:28:19 +00:00
Andrew Kolos
0d7f3712b4
Delete FlutterCommand.usageValues
( #162468 )
...
toward https://github.com/flutter/flutter/issues/150575 . More simple
deletes.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
2025-01-30 21:05:04 +00:00
Andrew Kolos
bc7703f886
remove more (simple) usage of package:usage ( #162354 )
...
Towards https://github.com/flutter/flutter/issues/150575 .
Tries to remove as much `Usage` as possible while avoiding more
complicated bits that require more scrutiny to make sure we aren't
losing test coverage or otherwise regressing. Said another way, almost
the entire diff is just deleting code to send GA3 events, and the
corresponding GA4 code can be found right next to it—making it easy to
verify we aren't losing events/tests.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
<!-- 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
2025-01-30 18:09:19 +00:00
Matan Lurey
8b9b6a39af
Fix tests to prepare for --explicit-package-dependencies
and a bug. ( #162289 )
...
@camsim99 discovered these would fail here:
https://github.com/flutter/flutter/pull/161826#issuecomment-2617059566 .
This fixes in preparation for the flag flipping, and also fixes a bug in
resolving `synthetic-package` I missed (it _can't_ be true if
`--explicit-package-dependencies` is set).
2025-01-29 02:04:50 +00:00
Andrew Kolos
a9c50335c7
remove dependency on Usage
from Pub
class ( #162279 )
...
Towards https://github.com/flutter/flutter/issues/150575
Removes more usage of `Usage`. This PR is scoped to removing all
references to it in `pub`-related code.
<details>
<summary> Pre-launch checklist </summary>
- [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.
</details>
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
2025-01-28 17:32:27 +00:00
Mouad Debbar
3755fd1f6e
[web] Remove HTML renderer from framework tests ( #162038 )
...
- Cleanup many HTML special cases and skips in framework tests.
- Update some dartdocs that referred to the HTML renderer.
For reviewers: it may help if you set `Hide whitespace` to true in
Github. It will help you skip through all the formatting/indentation
changes.
2025-01-24 21:33:27 +00:00