Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add frame number and widget location map service extension #148702

Merged
merged 13 commits into from
May 22, 2024

Conversation

helin24
Copy link
Member

@helin24 helin24 commented May 20, 2024

This helps us add widget rebuild counts to the DevTools performance page: flutter/devtools#4564

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label May 20, 2024
@@ -1114,6 +1114,14 @@ mixin WidgetInspectorService {
registerExtension: registerExtension,
);

_registerSignalServiceExtension(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be using registerServiceExtension instead of _registerSignalServiceExtension?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, as I copied and pasted this - it looks like _registerSignalServiceExtension just calls registerServiceExtension but wraps the result properly, so I figured it's a convenience function. Do you know more about what a "signal service" should be?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sg to use _registerSignalServiceExtension then

<String, String>{},
))! as Map<String, Object?>;

final Map<String, Object?> widgetTestLocations = locationMapJson[file]! as Map<String, Object?>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will the content of this map be stable? If so, can we just assert the raw content of the map is what we expect?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some content in here that depends on specific locations related to the sample ClockDemo code (e.g. lines and columns are literally locations in the test file and dependent widgets), so they could change as the test file changes. I think just verifying that counts match up and a few widget names match is good enough to validate the format of the map.

@helin24
Copy link
Member Author

helin24 commented May 21, 2024

Hmm any advice on how to resolve the tests? The details don't seem to explain what's wrong, and I'm not sure if this link (https://github.com/flutter/flutter/wiki/Understanding-a-LUCI-build-failure) is relevant.

@christopherfujino christopherfujino requested review from andrewkolos and removed request for christopherfujino May 21, 2024 23:02
@christopherfujino
Copy link
Member

@andrewkolos PTAL

@kenzieschmoll kenzieschmoll added the autosubmit Merge PR when tree becomes green via auto submit App label May 22, 2024
@auto-submit auto-submit bot merged commit edf312d into flutter:master May 22, 2024
73 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 23, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 23, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request May 23, 2024
flutter/flutter@73bf206...8d955cd

2024-05-23 nate.w5687@gmail.com Update `FocusManager` platform check to include iOS (flutter/flutter#148612)
2024-05-23 matej.knopp@gmail.com [iOS] fix hot restart with native assets (flutter/flutter#148752)
2024-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8b82454e302 to 964f087f288c (8 revisions) (flutter/flutter#148943)
2024-05-23 104349824+huycozy@users.noreply.github.com Fix DecoratedSliver sample code to reflect the description (flutter/flutter#148621)
2024-05-23 82763757+NobodyForNothing@users.noreply.github.com Test raw autocomplete api examples (flutter/flutter#148234)
2024-05-23 32538273+ValentinVignal@users.noreply.github.com Add test for scaffold.0.dart and scaffold.2.dart (flutter/flutter#148166)
2024-05-23 sokolovskyi.konstantin@gmail.com Add tests for restorable_value.0.dart API example. (flutter/flutter#148676)
2024-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8b094fbb94d8 to b8b82454e302 (6 revisions) (flutter/flutter#148919)
2024-05-22 31859944+LongCatIsLooong@users.noreply.github.com Allow `RenderObject.getTransformTo` to take an arbitrary RenderObject in the same tree (flutter/flutter#148897)
2024-05-22 kevinjchisholm@google.com 3.22.1 changelog updates (flutter/flutter#148895)
2024-05-22 helinx@google.com Add frame number and widget location map service extension (flutter/flutter#148702)
2024-05-22 31859944+LongCatIsLooong@users.noreply.github.com Remove an assert with false positives (flutter/flutter#148795)
2024-05-22 rmolivares@renzo-olivares.dev Revert "Fix the second TextFormField to trigger onTapOutside" (flutter/flutter#148909)
2024-05-22 katelovett@google.com [wiki migration] Remaining pages under docs/about/ (flutter/flutter#148782)
2024-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6971cdf14f8 to 8b094fbb94d8 (3 revisions) (flutter/flutter#148883)
2024-05-22 42757204+wyqlxf@users.noreply.github.com Fix the second TextFormField to trigger onTapOutside (flutter/flutter#148206)
2024-05-22 34871572+gmackall@users.noreply.github.com Try removing robolectric from `integration_test` tests (flutter/flutter#148803)
2024-05-22 victoreronmosele@gmail.com Prevent test folder deletion on running `flutter create --empty` on an existing app project (flutter/flutter#147160)
2024-05-22 katelovett@google.com [wiki migration] Tool team pages (flutter/flutter#148779)
2024-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from c89defa55801 to b6971cdf14f8 (6 revisions) (flutter/flutter#148819)
2024-05-22 dacoharkes@google.com [native_assets] Add support for link hooks (flutter/flutter#148474)
2024-05-22 engine-flutter-autoroll@skia.org Roll Packages from ba19b24 to 6525441 (12 revisions) (flutter/flutter#148864)
2024-05-22 36861262+QuncCccccc@users.noreply.github.com Update tokens to 4.0.0 (flutter/flutter#148789)
2024-05-22 zanderso@users.noreply.github.com Move Linux web_long_running_tests_2_5 to bringup (flutter/flutter#148854)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@kenzieschmoll kenzieschmoll added the cp: beta cherry pick this pull request to beta release candidate branch label May 30, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request May 30, 2024
…48702)

This helps us add widget rebuild counts to the DevTools performance page: flutter/devtools#4564
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
…48702)

This helps us add widget rebuild counts to the DevTools performance page: flutter/devtools#4564
auto-submit bot pushed a commit that referenced this pull request Jun 5, 2024
#149345)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

DevTools release 2.36.0: https://dart-review.googlesource.com/c/sdk/+/368762

### Changelog Description:

This change adds a service extension that DevTools uses to support a "Track widget build counts" feature. This feature is first included in DevTools 2.36.0.

### Impact Description:

This service extension is required for DevTools 2.36.0, which needs to be [cherry-picked](https://dart-review.googlesource.com/c/sdk/+/368762) into the Dart SDK. This beta release of DevTools missed the code cutoff because we were targeting the date listed on go/dash-team-releases (5/29). Since the beta release went out early, we missed the cut off and need to cherry-pick.

Since this DevTools release depended on the changes from #148702, we also need to cherry pick those changes into the flutter beta channel.

### Workaround:
No. This is required for DevTools 2.36.0 to work properly: https://dart-review.googlesource.com/c/sdk/+/368762.

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

With this change, a flutter app connecting to DevTools 2.36.0 (already on the Dart SDK main branch and trying to CP into the Dart SDK beta branch) will be able to use the "Track widget build counts" feature in DevTools.
arc-yong pushed a commit to Arctuition/packages-arc that referenced this pull request Jun 14, 2024
flutter/flutter@73bf206...8d955cd

2024-05-23 nate.w5687@gmail.com Update `FocusManager` platform check to include iOS (flutter/flutter#148612)
2024-05-23 matej.knopp@gmail.com [iOS] fix hot restart with native assets (flutter/flutter#148752)
2024-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from b8b82454e302 to 964f087f288c (8 revisions) (flutter/flutter#148943)
2024-05-23 104349824+huycozy@users.noreply.github.com Fix DecoratedSliver sample code to reflect the description (flutter/flutter#148621)
2024-05-23 82763757+NobodyForNothing@users.noreply.github.com Test raw autocomplete api examples (flutter/flutter#148234)
2024-05-23 32538273+ValentinVignal@users.noreply.github.com Add test for scaffold.0.dart and scaffold.2.dart (flutter/flutter#148166)
2024-05-23 sokolovskyi.konstantin@gmail.com Add tests for restorable_value.0.dart API example. (flutter/flutter#148676)
2024-05-23 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8b094fbb94d8 to b8b82454e302 (6 revisions) (flutter/flutter#148919)
2024-05-22 31859944+LongCatIsLooong@users.noreply.github.com Allow `RenderObject.getTransformTo` to take an arbitrary RenderObject in the same tree (flutter/flutter#148897)
2024-05-22 kevinjchisholm@google.com 3.22.1 changelog updates (flutter/flutter#148895)
2024-05-22 helinx@google.com Add frame number and widget location map service extension (flutter/flutter#148702)
2024-05-22 31859944+LongCatIsLooong@users.noreply.github.com Remove an assert with false positives (flutter/flutter#148795)
2024-05-22 rmolivares@renzo-olivares.dev Revert "Fix the second TextFormField to trigger onTapOutside" (flutter/flutter#148909)
2024-05-22 katelovett@google.com [wiki migration] Remaining pages under docs/about/ (flutter/flutter#148782)
2024-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6971cdf14f8 to 8b094fbb94d8 (3 revisions) (flutter/flutter#148883)
2024-05-22 42757204+wyqlxf@users.noreply.github.com Fix the second TextFormField to trigger onTapOutside (flutter/flutter#148206)
2024-05-22 34871572+gmackall@users.noreply.github.com Try removing robolectric from `integration_test` tests (flutter/flutter#148803)
2024-05-22 victoreronmosele@gmail.com Prevent test folder deletion on running `flutter create --empty` on an existing app project (flutter/flutter#147160)
2024-05-22 katelovett@google.com [wiki migration] Tool team pages (flutter/flutter#148779)
2024-05-22 engine-flutter-autoroll@skia.org Roll Flutter Engine from c89defa55801 to b6971cdf14f8 (6 revisions) (flutter/flutter#148819)
2024-05-22 dacoharkes@google.com [native_assets] Add support for link hooks (flutter/flutter#148474)
2024-05-22 engine-flutter-autoroll@skia.org Roll Packages from ba19b24 to 6525441 (12 revisions) (flutter/flutter#148864)
2024-05-22 36861262+QuncCccccc@users.noreply.github.com Update tokens to 4.0.0 (flutter/flutter#148789)
2024-05-22 zanderso@users.noreply.github.com Move Linux web_long_running_tests_2_5 to bringup (flutter/flutter#148854)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App cp: beta cherry pick this pull request to beta release candidate branch framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants