devtools
Reroot references.
#5246
Merged

Reroot references. #5246

polina-c merged 13 commits into flutter:master from polina-c:reroot
polina-c
polina-c2 years ago (edited 2 years ago)

RELEASE_NOTE_EXCEPTION=[behind flag]

Screen.Recording.2023-02-13.at.1.34.08.PM.mov
polina-c -
a5ce46ac
polina-c Update console_service.dart
ae4087ae
polina-c -
034b5eb1
polina-c -
1ea42d73
polina-c Update preferences.dart
64c8d526
polina-c Update preferences.dart
24aeb9ec
polina-c polina-c requested a review from bkonyi bkonyi 2 years ago
polina-c polina-c requested a review 2 years ago
polina-c -
268c32fb
polina-c -
d4f2f805
polina-c Merge branch 'master' of github.com:flutter/devtools into reroot
d52f1322
polina-c -
477369c7
polina-c -
22111683
polina-c polina-c changed the title Reroot static in and out references. Reroot references. 2 years ago
bkonyi
bkonyi commented on 2023-02-14
packages/devtools_app/lib/src/shared/console/console_service.dart
7676class ConsoleService extends Disposer {
77 void appendBrowsableInstance({
78 required InstanceRef? instanceRef,
79
required IsolateRef? isolateRef,
bkonyi2 years ago

When will we have a null isolate?

polina-c2 years ago (edited 2 years ago)

It is nullable for consistency with other methods in this class. May be we should refactor/review the code to deal better with nullability of IsolateRef and define right places to bung it.

Conversation is marked as resolved
Show resolved
packages/devtools_app/lib/src/shared/console/eval/eval_service.dart
127 preferences.memory.refLimit.value,
128 );
129
130
return (instances.instances ?? []).firstWhereOrNull(
bkonyi2 years ago👍 1

Nit: can the empty list be const?

packages/devtools_app/lib/src/shared/console/eval/eval_service.dart
129
130 return (instances.instances ?? []).firstWhereOrNull(
131 (i) => i is InstanceRef && i.identityHashCode == object.code,
132
) as InstanceRef?;
bkonyi2 years ago

I think you can remove this cast if you explicitly define the type parameter for the empty list as InstanceRef.

polina-c2 years ago

nope, because instances returns list of ObjRef

packages/devtools_app/lib/src/shared/console/widgets/display_provider.dart
1717
18VariableSelectionControls _selectionControls({
19 required DartObjectNode variable,
20
required Function(TextSelectionDelegate delegate)? onInspect,
bkonyi2 years ago

Nit: consider making this optional.

polina-c2 years ago

I want it to be explicitly specified even when it is null.

Conversation is marked as resolved
Show resolved
packages/devtools_app/lib/src/shared/diagnostics/references.dart
148191 variable: variable,
149192 );
150193
194
// ?????
bkonyi2 years ago👍 1

????? indeed 😉

packages/devtools_app/lib/src/shared/preferences.dart
327327 final refLimitTitle = 'Limit for number of requested live instances.';
328328 final refLimit = ValueNotifier<int>(_defaultRefLimit);
329 static const _defaultRefLimit = 100;
329
static const _defaultRefLimit = 100000;
bkonyi2 years ago

Does this correspond to a maximum number of VM service objects that can be requested / tracked? If so, there's a good chance service IDs will expire before you hit this limit.

polina-c2 years ago

It is parameter, passed to getInstances at the moment. It seems we will not need it as soon as we will start using getInstancesAsArray.

polina-c Update references.dart
c1f929bb
polina-c Update eval_service.dart
2b1db0ca
bkonyi
bkonyi approved these changes on 2023-02-14
polina-c polina-c merged f30c07d5 into master 2 years ago
polina-c polina-c deleted the reroot branch 2 years ago
kenzieschmoll
kenzieschmoll2 years ago

DBC: we should make sure that the tree view can be traversed with arrow keys to give the best UX here. Not sure if we already support this or not, but we do support this for the tree table so we might be able to steal some of that logic to implement if the tree view does not support this already.

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone