Skip to content

Commit da724be

Browse files
authored
Merge branch 'master' into 2.45.1
2 parents 74b3c51 + b133687 commit da724be

26 files changed

Lines changed: 164 additions & 131 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ able to connect the DevTools web app to an IDE or another DevTools instance for
211211

212212
To see the full list of arguments available for either command, please pass the `-h` flag.
213213

214-
### DevTools + VS Code integration (IDE-embedded DevTools experience)
214+
### IDE-embedded DevTools experience
215+
216+
#### DevTools + VS Code integration
215217

216218
To test the integration with VS Code, you can set up the Dart VS Code extension to run DevTools
217219
and the server from your local source code. Follow the
@@ -244,6 +246,10 @@ Next, restart VS Code (or run the **Developer: Reload Window** command from the
244246
and DevTools will be run from your local source code. After making any code changes to DevTools or the
245247
server, you will need to re-run the **Developer: Reload Window** command to rebuild and restart the server.
246248

249+
#### DevTools + IntelliJ integration
250+
251+
Follow instructions in the Flutter-IntelliJ repo's `CONTRIBUTING` guide: [#developing-with-local-devtools](https://github.com/flutter/flutter-intellij/blob/master/CONTRIBUTING.md#developing-with-local-devtools)
252+
247253
## Testing for DevTools
248254

249255
Please see [TESTING.md](TESTING.md) for guidance on running and writing tests.

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ linter:
7171
# - constant_identifier_names # https://github.com/dart-lang/linter/issues/204
7272
- control_flow_in_finally
7373
- directives_ordering
74-
# - discarded_futures # TODO(https://github.com/flutter/devtools/issues/9102): Re-enable.
74+
- discarded_futures
7575
- empty_catches
7676
- empty_constructor_bodies
7777
- empty_statements

flutter-candidate.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ceec33f16beaccf5e7a86099f0544ea52a327b28
1+
a7f820163c5d7d5321872c60f22fa047fb94bd7b

packages/devtools_app/lib/devtools.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
/// Note: a regexp in the `dt update-version' command logic matches the constant
1111
/// declaration `const version =`. If you change the declaration you must also
1212
/// modify the regex in the `dt update-version' command logic.
13-
const version = '2.45.1';
13+
const version = '2.46.0-dev.0';

packages/devtools_app/lib/src/framework/home_screen.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import '../shared/primitives/blocking_action_mixin.dart';
2222
import '../shared/primitives/utils.dart';
2323
import '../shared/title.dart';
2424
import '../shared/ui/vm_flag_widgets.dart';
25+
import '../shared/utils/utils.dart';
2526
import 'framework_core.dart';
2627

2728
class HomeScreen extends Screen {
@@ -259,7 +260,7 @@ class _ConnectInputState extends State<ConnectInput> with BlockingActionMixin {
259260
}
260261

261262
assert(() {
262-
storage.setValue(_debugVmServiceUriKey, uri);
263+
safeUnawaited(storage.setValue(_debugVmServiceUriKey, uri));
263264
return true;
264265
}());
265266

packages/devtools_app/lib/src/screens/debugger/debugger_controller.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import '../../shared/framework/screen_controllers.dart';
2626
import '../../shared/globals.dart';
2727
import '../../shared/primitives/message_bus.dart';
2828
import '../../shared/primitives/utils.dart';
29+
import '../../shared/utils/utils.dart';
2930
import 'codeview_controller.dart';
3031
import 'debugger_model.dart';
3132

@@ -399,9 +400,9 @@ class DebuggerController extends DevToolsScreenController
399400
/// This method ensures that the source for the script is populated in our
400401
/// cache, in order to reduce flashing in the editor view.
401402
void _populateScriptAndShowLocation(ScriptRef scriptRef) {
402-
unawaited(
403-
scriptManager.getScript(scriptRef).then((script) {
404-
codeViewController.showScriptLocation(ScriptLocation(scriptRef));
403+
safeUnawaited(
404+
scriptManager.getScript(scriptRef).then((script) async {
405+
await codeViewController.showScriptLocation(ScriptLocation(scriptRef));
405406
}),
406407
);
407408
}

packages/devtools_app/lib/src/screens/inspector/inspector_controller.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import '../../shared/diagnostics/primitives/instance_ref.dart';
3434
import '../../shared/globals.dart';
3535
import '../../shared/primitives/query_parameters.dart';
3636
import '../../shared/primitives/utils.dart';
37+
import '../../shared/utils/utils.dart';
3738
import '../inspector_shared/inspector_screen.dart';
3839
import 'inspector_tree_controller.dart';
3940

@@ -105,12 +106,14 @@ class InspectorController extends DisposableController
105106
// won't interfere with users.
106107
addAutoDisposeListener(_supportsToggleSelectWidgetMode, () {
107108
if (_supportsToggleSelectWidgetMode.value) {
108-
serviceConnection.serviceManager.serviceExtensionManager
109-
.setServiceExtensionState(
110-
extensions.enableOnDeviceInspector.extension,
111-
enabled: true,
112-
value: true,
113-
);
109+
safeUnawaited(
110+
serviceConnection.serviceManager.serviceExtensionManager
111+
.setServiceExtensionState(
112+
extensions.enableOnDeviceInspector.extension,
113+
enabled: true,
114+
value: true,
115+
),
116+
);
114117
}
115118
});
116119
}

packages/devtools_app/lib/src/screens/inspector_v2/inspector_controller.dart

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import '../../shared/globals.dart';
3535
import '../../shared/managers/notifications.dart';
3636
import '../../shared/primitives/query_parameters.dart';
3737
import '../../shared/primitives/utils.dart';
38+
import '../../shared/utils/utils.dart';
3839
import '../inspector_shared/inspector_screen.dart';
3940
import 'inspector_data_models.dart';
4041
import 'inspector_tree_controller.dart';
@@ -112,12 +113,14 @@ class InspectorController extends DisposableController
112113
// won't interfere with users.
113114
addAutoDisposeListener(_supportsToggleSelectWidgetMode, () {
114115
if (_supportsToggleSelectWidgetMode.value) {
115-
serviceConnection.serviceManager.serviceExtensionManager
116-
.setServiceExtensionState(
117-
extensions.enableOnDeviceInspector.extension,
118-
enabled: true,
119-
value: true,
120-
);
116+
safeUnawaited(
117+
serviceConnection.serviceManager.serviceExtensionManager
118+
.setServiceExtensionState(
119+
extensions.enableOnDeviceInspector.extension,
120+
enabled: true,
121+
value: true,
122+
),
123+
);
121124
}
122125
});
123126

packages/devtools_app/lib/src/screens/inspector_v2/inspector_screen_body.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import '../../shared/managers/error_badge_manager.dart';
1919
import '../../shared/primitives/blocking_action_mixin.dart';
2020
import '../../shared/ui/common_widgets.dart';
2121
import '../../shared/ui/search.dart';
22+
import '../../shared/utils/utils.dart';
2223
import '../inspector_shared/inspector_controls.dart';
2324
import '../inspector_shared/inspector_screen.dart';
2425
import 'inspector_controller.dart';
@@ -97,7 +98,7 @@ class InspectorScreenBodyState extends State<InspectorScreenBody>
9798
addAutoDisposeListener(preferences.inspector.pubRootDirectories, () {
9899
if (serviceConnection.serviceManager.connectedState.value.connected &&
99100
controller.firstInspectorTreeLoadCompleted) {
100-
controller.refreshInspector();
101+
safeUnawaited(controller.refreshInspector());
101102
}
102103
});
103104

packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import '../../../../../service/service_extensions.dart' as extensions;
1414
import '../../../../../shared/globals.dart';
1515
import '../../../../../shared/primitives/utils.dart';
1616
import '../../../../../shared/ui/common_widgets.dart';
17+
import '../../../../../shared/utils/utils.dart';
1718
import '../performance_controls.dart';
1819
import 'enhance_tracing_controller.dart';
1920

@@ -142,7 +143,7 @@ class _TraceWidgetBuildsSettingState extends State<TraceWidgetBuildsSetting>
142143
for (final type in TraceWidgetBuildsScope.values) {
143144
final extension = _traceWidgetBuildsExtensions[type]!;
144145

145-
unawaited(
146+
safeUnawaited(
146147
serviceConnection.serviceManager.serviceExtensionManager
147148
.waitForServiceExtensionAvailable(extension.extension)
148149
.then((isServiceAvailable) {
@@ -154,9 +155,13 @@ class _TraceWidgetBuildsSettingState extends State<TraceWidgetBuildsSetting>
154155
.serviceExtensionManager
155156
.getServiceExtensionState(extension.extension);
156157

157-
_updateForServiceExtensionState(state.value, type);
158+
safeUnawaited(
159+
_updateForServiceExtensionState(state.value, type),
160+
);
158161
addAutoDisposeListener(state, () {
159-
_updateForServiceExtensionState(state.value, type);
162+
safeUnawaited(
163+
_updateForServiceExtensionState(state.value, type),
164+
);
160165
});
161166
}
162167
}),

0 commit comments

Comments
 (0)