flutter / flutter/devtools

`dcm check-unused-code`: bugs discovered where code is incorrectly unused.

Offen
#9,910 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug cleanup P2
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

Findings:
1. **vm_developer** screen: this to delete the unused code requires deleting most of this file. It seems like a bug that the description is not used. CC @bkonyi
```
packages/devtools_app/lib/src/screens/vm_developer/object_inspector/inbound_references_tree.dart (1 issue):
✖ unused field description
at packages/devtools_app/lib/src/screens/vm_developer/object_inspector/inbound_references_tree.dart:29:3
```
2. **vm_developer** screen: it seems like a bug if we are intending `ProfileCode` to be serializable but it is unused. CC @bkonyi
```
packages/devtools_app/lib/src/screens/vm_developer/vm_service_private_extensions.dart (8 issues):
✖ unused method toJson
at packages/devtools_app/lib/src/screens/vm_developer/vm_service_private_extensions.dart:856:3
```
3. **profiler** screen: we used to have functionality to load an app startup profile by a user tag. This should be investigated to see if this method can be removed or if the fact that this is unused is a regression.
```
packages/devtools_app/lib/src/screens/profiler/cpu_profiler_controller.dart (1 issue):
✖ unused method loadAppStartUpProfile
at packages/devtools_app/lib/src/screens/profiler/cpu_profiler_controller.dart:414:3
```
4. **app size screen**
```
packages/devtools_app/lib/src/shared/charts/treemap.dart (1 issue):
✖ unused field childrenMap
at packages/devtools_app/lib/src/shared/charts/treemap.dart:685:3
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by running `dcm check-unused-code` and inspect the reported locations in `inbound_references_tree.dart`, `vm_service_private_extensions.dart`, `cpu_profiler_controller.dart`, and `treemap.dart`. Determine whether each finding is a real unused member, an intended serialization path, or a regression in app-startup-profile loading; done means each finding has a justified removal or correction.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart
Bereich
devtools, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.