flutter / flutter/devtools

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

未关闭
#9,910 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug cleanup P2
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

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

贡献指南

打开贡献指南

调研方向

首先运行 `dcm check-unused-code`,检查 `inbound_references_tree.dart`、`vm_service_private_extensions.dart`、`cpu_profiler_controller.dart` 和 `treemap.dart` 中报告的位置。确定每个发现究竟是真正未使用的成员、有意设计的序列化路径,还是 app-startup-profile 加载中的回归;完成的标准是每个发现都有合理的删除或修正。

由索引模型根据 Issue 内容生成。

评估

技术栈
dart
领域
devtools, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
48/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。