7688 Commits

Author SHA1 Message Date
Ben Konyi
f8e8a8dce9
[ Widget Preview ] Add --machine mode (#173654)
Currently only outputs a single event with information about where the
widget preview environment is served from:


`[{"event":"widget_preview.started","params":{"url":"http://localhost:61383"}}]`

Fixes https://github.com/flutter/flutter/issues/173545
2025-08-13 19:08:53 +00:00
Ben Konyi
1eb2f68da5
[ Widget Preview ] Move --dtd-url from a global flag to a widget-preview start option (#173712)
`--dtd-url` is only used by widget previews and has no current usage, so
this is a safe change.
2025-08-13 16:14:22 +00:00
Jamil Saadeh
f26eddba00
Null aware elements clean-ups (#173074)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->
Converted more null checks to null aware elements.
The analyzer had many false negatives and the regex became pretty wild
to find many of them 😂

I've found more in the engine folder but I'll apply the changes in a
separate PR

Part of #172188 

*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].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- 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-08-13 15:36:14 +00:00
Ben Konyi
c4ce6a8ef7
Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (#173628)
This reverts commit
17c92b7ba6.

Also added Chrome + `chromedriver` dependencies for the
`chrome_dev_mode` configurations.
2025-08-12 17:23:19 +00:00
Ben Konyi
fbba4becf6
[ Tool ] Fix crash from possible DDS startup race (#173362)
It's possible (but unlikely) that two DDS instances can try and start at
the same time (e.g., a "flutter run" is initiated while an existing
"flutter attach" is waiting for a target to attach to). This can lead to
DDS failing to initialize for one of the processes when the VM service
disconnects it after the other process successfully invokes the
"_yieldControlToDDS" RPC.

This change adds some retry logic to avoid crashing in this scenario.

Fixes https://github.com/flutter/flutter/issues/169265
2025-08-12 14:55:33 +00:00
auto-submit[bot]
17c92b7ba6
Reverts "Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (#173568)" (#173587)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#173568
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: bkonyi
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Chrome isn't configured for the test configuration
and is causing failures.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: bkonyi
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {jyameo, matanlurey}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
This reverts commit e2a347b14a18729dd24c2cf3240ef22562195e2d.

Previously reverted due to `*_chrome_dev_mode` tests failing on all
platforms.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-08-11 22:15:48 +00:00
Ben Konyi
a9fc145a3d
Reapply "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)" (#173568)
This reverts commit e2a347b14a18729dd24c2cf3240ef22562195e2d.

Previously reverted due to `*_chrome_dev_mode` tests failing on all
platforms.
2025-08-11 20:43:29 +00:00
John "codefu" McDole
e2a347b14a
Revert "Make device debuggable if useDwdsWebSocketConnection is true … (#173551)
Reverts #171648 for multiple failing tests

<img width="624" height="347" alt="image"
src="https://github.com/user-attachments/assets/affc7820-bd1a-408a-822c-3bc0df5f985d"
/>
2025-08-11 14:31:15 +00:00
Jessy Yameogo
1590543f67
Make device debuggable if useDwdsWebSocketConnection is true and added simple test case (#171648)
- Make device debuggable if useDwdsWebSocketConnection is true - This
change is needed to support hot reload on web-server devices over
websocket-based DWDS.
- Added simple test case to test hot reload over websocket

related to https://github.com/dart-lang/webdev/issues/2605,
https://github.com/dart-lang/webdev/issues/2645 and
https://github.com/dart-lang/webdev/issues/2646

---------

Co-authored-by: Ben Konyi <bkonyi@google.com>
2025-08-09 03:18:19 +00:00
Matt Boetger
e0660cfb5e
Fix null value reference in flutter logs path (#173437)
The `flutter logs` path for a module does not pass the buildInfo to the
`fromAndroidProject` function. This will cause an exception to be thrown
when `buildInfo!` is invoked. Instead, just allow the buildInfo to be
null and check for the manifest with the code that already exists.

Fixes: #172884

## 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.
- [ ] 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: Reid Baker <reidbaker@google.com>
2025-08-08 19:22:16 +00:00
Victoria Ashworth
38217906e9
Use LLDB as the default debugging method for iOS 17+ and Xcode 26+ (#173443)
This PR introduces a new feature flag called `lldb-debugging`, which is
turned on by default. When this feature is turned on, if deploying to a
physical iOS 17+ device with Xcode 26+, it will use a mixture of
`devicectl` and `lldb` to install, launch, and debug the app.

If LLDB fails, it will fallback to use Xcode automation. If LLDB times
out, it will warn the user they may want to disable it. If LLDB is
disabled, it will use Xcode automation.

This PR also adds analytics to track what deployment method is used and
if it's successful.

Part 2 and 3 of https://github.com/flutter/flutter/issues/173416.

Fixes https://github.com/flutter/flutter/issues/144218. Fixes
https://github.com/flutter/flutter/issues/133465.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- 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-08-08 17:13:24 +00:00
Wdestroier
e4c07e8ab2
Support launching a HTTPS URL (#164720)
I setup a reverse proxy, but this piece of code only allows launching
HTTP URLs. I'm submitting a patch to fix the error.

See issue comment
https://github.com/Dart-Code/Dart-Code/issues/5322#issuecomment-2704159264
for context.

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] 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 `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [ ] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

<!-- 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-08-08 14:38:38 +00:00
Salem Iranloye
796c62bd76
Web dev proxy (#172175)
Adding a development Proxy and dedicated Web configuration File

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Flutter's current web development configuration relies on CLI arguments
and does not have a development proxy. This PR adds a development proxy
to flutter and a designated web_dev_config.yaml where web configuration
settings are loaded from.

Issues:
https://github.com/flutter/flutter/issues/170834

Document:

[HERE](https://docs.google.com/document/d/1Ud9D3F0GxB5Ocoo5NnAy7PH5oo3qxvALxUlAXMCANJ0/edit?usp=sharing)

## 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.
- [ ] 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: Sydney Bao <s.bao2115@gmail.com>
Co-authored by: Salem Iranloye <salemiranloye@gmail.com>

---------

Co-authored-by: Kevin Moore <kevmoo@google.com>
Co-authored-by: Sydney Bao <sydneybao@google.com>
2025-08-07 22:42:16 +00:00
Victoria Ashworth
b57c9742f3
Prepare for iOS debugging with lldb and devicectl (#173417)
This PR introduces new classes and methods needed to transition to using
`devicectl` (for installing and launching) and `lldb` (for debugging)
for deploying apps to iOS 17+ physical devices.

The new classes/methods are not used yet to reduce risk for
cherry-picking. A follow up PR will adopt them.

Part 1 of https://github.com/flutter/flutter/issues/173416.

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

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- 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-08-07 20:14:31 +00:00
Micael Cid
3be04414e9
[web] add --static-assets-url argument to build web (#171638)
Closes https://github.com/flutter/flutter/issues/171637

As mentioned in the issue, I am proposing a new argument to the flutter
build web command: `--static-assets-url`.

This argument would accept a full URL string ending with `/` as its
value. During the build process, the Flutter tool would use this value
to replace a dedicated placeholder within the `web/index.html` file
(inspired by `--base-href` approach).

Example Implementation:

A developer would modify their `web/index.html` to use a new
placeholder, for instance, `$FLUTTER_STATIC_ASSETS_URL`:

```html
...
<body>
  <script>
    {{flutter_js}}
    {{flutter_build_config}}

    _flutter.loader.load({
      config: {
        entryPointBaseUrl: "$FLUTTER_STATIC_ASSETS_URL",
      },
      onEntrypointLoaded: async function (engineInitializer) {
        const appRunner = await engineInitializer.initializeEngine({
          assetBase: "$FLUTTER_STATIC_ASSETS_URL",
        });

        await appRunner.runApp();
      },
    });
  </script>
</body>
...
 ```

The build command would be run with the new flag: `flutter build web --static-assets-url="https://static.company.com/some-webapp/“` - and the resulting `build/web/index.html` would have the placeholder replaced: 

```html
...
<body>
  <script>
    {{flutter_js}}
    {{flutter_build_config}}

    _flutter.loader.load({
      config: {
        entryPointBaseUrl: "https://static.company.com/some-webapp/",
      },
      onEntrypointLoaded: async function (engineInitializer) {
        const appRunner = await engineInitializer.initializeEngine({
          assetBase: "https://static.company.com/some-webapp/",
        });

        await appRunner.runApp();
      },
    });
  </script>
</body>
...
```
2025-08-07 17:05:56 +00:00
Reid Baker
f15262c9f7
[android][tool] Consolidate minimum versions for android projects. (#171965)
I discovered we had a duplicate entry for what the min sdk api level
flutter supports along with duplicate code for telling the user.
This pr keeps the duplicate warnings but removed duplicate definitions. 
Updates the related tests
Updates workflow_test and android_workflow to compare against the
compile sdk version since the validation was ensuring that the lastest
of the installed sdks was at least what was needed for flutter to
compile. This make this pr more than a formatting/refactoring change and
an actual user facing change. Requesting re-review.
## 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.
2025-08-07 14:12:43 +00:00
Ben Konyi
024a80bf42
[ Widget Preview ] Cleanup for experimental release (#173289)
Widget previews are being released as an experimental feature in the
next stable release.

This change has some minor last minute changes to prepare for release:
  - Makes `flutter widget-preview` visible
  - Adds documentation links to docs.flutter.dev (not yet staged)
- Fixes minor bug with asset loading due to `AssetManifest.bin.json` not
being accounted for in the asset path mapping logic
2025-08-05 18:10:06 +00:00
Jason Simmons
40fcfc7686
In "flutter create", use the project directory in the suggested "cd" command instead of the main source file path (#173132) 2025-08-04 19:12:12 +00:00
Matthew Kosarek
69264e4a60
Add the 'windowing' feature flag and use to wrap an implementation for regular windows that always throws (#172478)
## What's new?

- Added the `windowing` feature flag to the project
- Created the internal `_window.dart` API with support for regular
windows
- Implemented a `_WindowingOwnerUnsupported` implementation of the
`WindowingOwner` interface
- Marked all points of the public API as `@internal` with a
corresponding warning documentation
- Threw an `UnsupportedError` where it is appropriate to do so

Note that this PR does **NOT** include a real implementation of
`WindowingOwner` (e.g. for win32 or macOS). That work will be opened as
a follow up.

This work is based off of https://github.com/flutter/flutter/pull/168697
and http://github.com/flutter/flutter/pull/168437, as well as this
design document:
https://docs.flutter.dev/go/multi-window-experimental-apis

## 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: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
2025-08-04 17:54:53 +00:00
Reid Baker
561c3d27d3
Improve robustness of comment detection when using flutter analyze --suggestions (#172977)
Fixes #172055

~For some reason a trailing slash at the end of a comment or a line
below the commented out line that otherwise would match would cause the
regex to match that should be ignored.~

~I could not reason about why the trailing slash would cause a match but
the primary change apart from more robust tests is adding `^\s*` which
pins the match on lines that start with some amount of space before
excluding lines that use `//`~

The regex was overbroad at matching and we were getting lucky that the
second "version" was the one being selected a trailing slash broke the
overbroad match and selected the smaller match that was inside the
comment. The new fix was to pin the multi line regex to the start of a
line that way we can still handle newlines in the definition while
ensuring that commented out lines are not included.

The bug was for AGP version in plugins but the fix was applied to all of
the regular expressions in this area of code along with adversarial
units tests to prevent regression.

Note for other contributors https://regex101.com/ was a great resource
for debugging what was happening here.

## 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-08-04 16:49:07 +00:00
Derek Xu
28481edd6b
Add --profile-startup flag to flutter run (#172990)
This PR adds a `--profile-startup` flag to `flutter run` that can be
used to set [the Flutter Engine's `--profile-startup`
switch](https://github.com/flutter/flutter/pull/172879).
2025-08-01 17:29:05 +00:00
Ben Konyi
b1d2636936
[ Widget Preview ] Add --web-server support (#172978)
This allows for the widget preview environment to be launched using the
`web-server` device instead of just opening Chrome.
2025-07-31 00:22:12 +00:00
Ben Konyi
b58151f885
[ Widget Previews ] Add support for MultiPreviews (#172852)
`MultiPreview` is an abstract class that allows for developers to create
custom preview annotations that can be used to easily create multiple
previews from a single annotation.

Fixes https://github.com/flutter/flutter/issues/166447
2025-07-30 20:31:25 +00:00
Lau Ching Jun
7832d840b6
Revert "Remove 2023 deprecated 'platforms' key from daemon output (#172593)" (#172883)
This reverts commit cfe6f3d95b3fb1ccf2cf944eab0273efc944bcf3.

The change broke the vscode extension. The extension has been updated in
https://github.com/Dart-Code/Dart-Code/pull/5610 but it is worth keeping
this for a little while longer.
2025-07-29 00:47:32 +00:00
auto-submit[bot]
4d060aeb34
Reverts "[flutter_tools] Add --no-codesign support for macOS build (#169034)" (#172878)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#169034
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: vashworth
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: failing in post-submit
https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8708074284638575793/+/u/run_test.dart_for_analyze_shard_and_subshard_None/stdout
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: knopp
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {bkonyi, vashworth}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
Unlike iOS, the macOS build currently does not support `--no-codesign`
option to skip signing of application bundle. Having this option is
useful for situation where the code-signing step is happens separately
after the bundle is built (i.e. on CI).

## 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

<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-28 20:07:47 +00:00
Matej Knopp
3ac59c9859
[flutter_tools] Add --no-codesign support for macOS build (#169034)
Unlike iOS, the macOS build currently does not support `--no-codesign`
option to skip signing of application bundle. Having this option is
useful for situation where the code-signing step is happens separately
after the bundle is built (i.e. on CI).

## 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

---------

Co-authored-by: Victoria Ashworth <15619084+vashworth@users.noreply.github.com>
2025-07-28 18:13:12 +00:00
stuartmorgan-g
3c9b1280a7
Add --config-only build option for Linux and Windows (#172239)
Adds a `--config-only` option for Linux and Windows, which generates the
native build files (ninja and Visual Studio respectively) without
actually doing the build. This brings them into alignment with Android,
iOS, and macOS, which already have this flag, and will allow some
workflow improvements when running native plugin tests in environments
like the flutter/packages CI.

Fixes https://github.com/flutter/flutter/issues/93407
Fixes https://github.com/flutter/flutter/issues/172029

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

<!-- 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: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-07-28 18:05:24 +00:00
René Kilczan
cfbaa18bde
Remove shortner (#172844)
Replacing shortner urls with the long versions. Fixes #172843

## 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.
- [ ] 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
2025-07-28 15:07:11 +00:00
Matan Lurey
0125d95f7e
Update flutter pub get to use flutter.version.json (instead of version) (#172798)
Towards https://github.com/flutter/flutter/issues/171900.

Discovered during https://github.com/flutter/flutter/pull/172793.

It's unfortunate that `DefaultPub` (and tests) need some massaging to
work, but the fact the tool is so inconsistent about global versus local
state is not a new thing, so I didn't worry about it in the context of
this PR.
2025-07-28 14:17:38 +00:00
Matan Lurey
e5b78fe6e5
Remove deprecated --[no-]-disable-dds (#172791)
Closes https://github.com/flutter/flutter/issues/150279.

Made a warning in https://github.com/flutter/flutter/pull/172595 and
cherry-picked into the next beta (will be stable) as
https://github.com/flutter/flutter/pull/172790.
2025-07-25 22:10:55 +00:00
Matan Lurey
0e7da1d019
Remove deprecated AssetManifest.json file (#172594)
Closes https://github.com/flutter/flutter/issues/143577.
2025-07-25 20:20:34 +00:00
Matan Lurey
3e86cb8773
Rename AppRunLogger, stop writing status messages that break JSON (#172591)
Closes https://github.com/flutter/flutter/issues/118907.

It looks like some of the work around splitting had already happened
(`DaemonLogger`), so this ... seems right?
2025-07-25 19:14:01 +00:00
Matan Lurey
465b21cee1
Add --dart-define, -D to assemble, deprecate --define, -d. (#172510)
Closes https://github.com/flutter/flutter/issues/98593.
Towards https://github.com/flutter/flutter/issues/97505.
2025-07-25 18:55:01 +00:00
Reynaldo
aea660d5cd
feat(tool): Respect user-data-dir flag from web-browser-flag (#169445)
### Respect user-data-dir flag from web-browser-flag

Currently, it's already possible to pass `web-browser-flag` when
launching Chrome, but the `user-data-dir` flag doesn't work as expected,
and there are some reasons for that.

In the implementation made in [PR
#104935](https://github.com/flutter/flutter/pull/104935), the
`web-browser-flag` is appended at the end of the Chrome launch
arguments.

For most scenarios, this works fine, as demonstrated in the Chrome unit
test below:

https://source.chromium.org/chromium/chromium/src/+/main:base/command_line_unittest.cc

```
TEST(CommandLineTest, MultipleSameSwitch) {
  const CommandLine::CharType* argv[] = {
      FILE_PATH_LITERAL("program"),
      FILE_PATH_LITERAL("--foo=one"),  // --foo first time
      FILE_PATH_LITERAL("-baz"),
      FILE_PATH_LITERAL("--foo=two")   // --foo second time
  };
  CommandLine cl(std::size(argv), argv);

  EXPECT_TRUE(cl.HasSwitch("foo"));
  EXPECT_TRUE(cl.HasSwitch("baz"));

  EXPECT_EQ("two", cl.GetSwitchValueASCII("foo"));
}
```
In this scenario, the parser will consider the last occurrence of a
flag.

However, this behavior does not apply to certain flags, because Chrome
processes some of them based on the first occurrence, not the last. This
is the case for `--user-data-dir`, which is parsed very early during
Chrome startup.

The proposed code checks whether `--user-data-dir` was provided via
`web-browser-flag`, and if so, it uses that value instead of the default
`%temp%\flutter_tools_chrome_device.xpto` temporary directory.

This also resolve this comment:
https://github.com/flutter/flutter/pull/104935#issuecomment-1694486157

Example: `launch.json`
```
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "flutter",
      "request": "launch",
      "type": "dart"
    },
    {
      "name": "flutter (profile mode)",
      "request": "launch",
      "type": "dart",
      "flutterMode": "profile"
    },
    {
      "name": "flutter (release mode)",
      "request": "launch",
      "type": "dart",
      "flutterMode": "release"
    },
    {
      "name": "Flutter for web (hot reloadable)",
      "type": "dart",
      "request": "launch",
      "program": "lib/main.dart",
      "args": [
        "-d",
        "chrome",
        "--web-port=5000",
        "--web-experimental-hot-reload",
        "--web-browser-flag=--user-data-dir=D:\\_Desenv\\flutter_tests\\chrome_profile"
      ]
    }
  ]
}
```

`chrome://version`

| Before | After  |
|--------|--------|
|
![before](https://github.com/user-attachments/assets/b3f33419-fbf1-446e-a471-745df2e8c4f6)
|
![after](https://github.com/user-attachments/assets/ea74a203-c269-4ce1-8a9b-f97e9a4cdc78)
|

Folder
| Before | After  |
|--------|--------|
|
![before_files](https://github.com/user-attachments/assets/8522e60b-d0eb-4b66-a4b6-c2d6ed34c15b)
|
![after_files](https://github.com/user-attachments/assets/ff94b498-b319-474c-89e5-c55f6e1c4383)
|

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

<!-- 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-07-25 15:43:06 +00:00
Jamil Saadeh
6937b0c35a
Migrate to null aware elements - Part 3 (#172307)
<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

Replace null checks with null aware elements - part 3

Part of #172188

## 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-07-25 14:20:55 +00:00
Matan Lurey
cfe6f3d95b
Remove 2023 deprecated 'platforms' key from daemon output (#172593)
Closes https://github.com/flutter/flutter/issues/140473.
2025-07-25 00:24:42 +00:00
Matan Lurey
28f63a398d
Remove support for pluginClass: none (on master; > 3.35.0) (#172579)
Closes https://github.com/flutter/flutter/issues/57497.

Warning was added to `3.35.0`-branch here:
https://github.com/flutter/flutter/pull/172315

... so this will only apply on `master`, and then the stable/beta
releases _after_ `3.35.0` ships to stable (quite some time).
2025-07-24 20:45:51 +00:00
Elijah Okoroh
fdc1b5cd29
Adapt xcresult parser for Xcode 16 changes (#172596)
This PR updates the iOS build process to support breaking changes in
Xcode 16's xcresulttool. The xcresulttool get command, which Flutter
uses to parse native build issues, is deprecated and replaced by the new
xcresulttool get build-results command. This new command also introduces
a completely new, flatter JSON output format.

To address this while maintaining backwards compatibility, this change
introduces a two-part solution:
- The XCResultGenerator now detects the Xcode version and conditionally
calls the appropriate command (get build-results for Xcode 16+ and get
for older versions).
- The XCResult parser has been refactored to be "bilingual," meaning it
can intelligently detect the JSON structure and parse both the old
(nested) and new (flat) formats correctly.
- This ensures that native iOS build errors and warnings continue to be
correctly parsed and displayed to the user on all supported Xcode
versions.

Fixes #151502 

## 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-07-23 23:14:52 +00:00
Matan Lurey
1e84cbef10
Emit a warning on --[no-]disable-dds, preferring --no-dds (#172595)
Towards https://github.com/flutter/flutter/issues/150279.

I'll CP this into 3.35, and then we can remove support for the flag on
`master`.

(IIRC this only still existed because of google3)
2025-07-23 14:36:35 +00:00
Matan Lurey
fb80c976c5
Prefix generated Dart plugin imports for registerWith (#172511)
Closes https://github.com/flutter/flutter/issues/100421.
2025-07-23 00:11:21 +00:00
Matan Lurey
7f92ee28ef
Remove stale references to .packages in tool tests (#172582)
Closes https://github.com/flutter/flutter/issues/106210.
2025-07-23 00:09:00 +00:00
Matan Lurey
6fd30fd25a
Wraps all git executions in a Git(...).*, use *=noglob on Windows (#172495)
Closes https://github.com/flutter/flutter/issues/74165.

The original issue called for, on Windows, telling `CYGWIN` to use
`=noglob`, to work around some git operation errors that happen when
using non-native Git. There ... was no great way to do this with the
existing codebase without, IMO, adding lots of confusing code.

So, I refactored all the calls of:
- before: `processUtils.<method>(['git', ...args], ...params)` 
- after: `git.<method>([...args], ...params)`

... and implicitly add the new environment variables, if
`Platform.isWindows`.

Did some minor test cleanup and process execution cleanup while I was at
it.
2025-07-23 00:03:32 +00:00
Matan Lurey
6d62770d08
Omit instruction to cd . after flutter create (#172513)
Closes https://github.com/flutter/flutter/issues/100588.
2025-07-22 22:45:14 +00:00
John "codefu" McDole
ff983d3598
feat: start using the content aware hash for downloading artifacts (#172552)
reland of https://github.com/flutter/flutter/pull/171927
towards https://github.com/flutter/flutter/issues/171790

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove engine.version being tracked in release
branches as an optimization.

FLUTTER_PREBUILT_ENGINE_VERSION will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.

fxies post submit tests for content_hash download:
SHARD=framework_tests SUBSHARD=misc dart --enable-asserts
dev/bots/test.dart
SHARD=tool_host_cross_arch_tests dart --enable-asserts
dev/bots/test.dart

```
  ╔═╡ERROR https://github.com/flutter/flutter/pull/1╞════════════════════════════════════════════════════════════════════
  ║ Expected "Flutter Engine Version: 45b085ab2118f30441ae6e2daab4b8eb3e4a063c", but found "Flutter Engine Version: 407c051ec9".
  ╚═══════════════════════════════════════════════════════════════════════════════
```

```
  Expected: contains '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
     Which: does not contain '45b085ab2118f30441ae6e2daab4b8eb3e4a063c'
```
2025-07-22 17:35:26 +00:00
Matan Lurey
d16e5b9971
Hide flutter assemble unless --verbose (#172508)
Towards https://github.com/flutter/flutter/issues/97505.
2025-07-22 05:34:22 +00:00
Matan Lurey
359b29382a
Omit w (widget tree), t (render tree) from flutter run --profile h (#172506)
Closes https://github.com/flutter/flutter/issues/91690.
2025-07-22 00:41:09 +00:00
Matan Lurey
ffd1baa342
Refactor checks for --machine (#172504)
Was already fixed in https://github.com/flutter/flutter/pull/150138, so
removes duplicate flag.

Already tested by existing test suite.
2025-07-22 00:41:08 +00:00
auto-submit[bot]
c5465e9eb7
Reverts "feat: start using the content aware hash for downloading artifacts (#171927)" (#172505)
<!-- start_original_pr_link -->
Reverts: flutter/flutter#171927
<!-- end_original_pr_link -->
<!-- start_initiating_author -->
Initiated by: matanlurey
<!-- end_initiating_author -->
<!-- start_revert_reason -->
Reason for reverting: Broke the tree, due to naughty tests but too
intensive to fix forward.
<!-- end_revert_reason -->
<!-- start_original_pr_author -->
Original PR Author: jtmcdole
<!-- end_original_pr_author -->

<!-- start_reviewers -->
Reviewed By: {matanlurey, chingjun}
<!-- end_reviewers -->

<!-- start_revert_body -->
This change reverts the following previous change:
towards #171790 

Use the content aware hash when downloading engine artifacts. These are
currently produced when changes to DEPs, engine/, or the release file
are changed in a not-seen-before way.

We can eventually remove `engine.version` being tracked in release
branches as an optimization.

`FLUTTER_PREBUILT_ENGINE_VERSION` will stay for overriding the
engine.version for testing. Though Cocoon does not need to actually set
it for framework only PRs anymore.
<!-- end_revert_body -->

Co-authored-by: auto-submit[bot] <flutter-engprod-team@google.com>
2025-07-21 23:09:47 +00:00
Matan Lurey
852760424a
Wrap ShutdownHook calls to avoid crashing the tool (#171917)
Closes https://github.com/flutter/flutter/issues/57351.
2025-07-21 18:41:08 +00:00
Srujan Gaddam
932cb033e6
Use baseUri always when doing a hot reload or hot restart (#172271)
We already use the baseUri when computing hot reload sources metadata as
it can never be null. The member is changed to be non-nullable to
reflect that.

To be consistent, we also use the baseUri (full url) for a hot restart
when running with the DDC library bundle format.

Related PR: https://github.com/dart-lang/webdev/pull/2650

## 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.
2025-07-21 17:40:57 +00:00