flutter / flutter/devtools

DevTools extensions not discovered when app entrypoint is under custom directory

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

描述

### Sumary

DevTools extension discovery fails if the main isolate root library is under a custom test directory (`patrol_test/` in our case) that is not recognized by DevTools’ package root heuristic. Extensions appear when tests are moved to `integration_test/` which is a recognized root.

### Context
I'm working on [Patrol](https://github.com/leancodepl/patrol) which has it's own devtools extension. We recently changed the default directory where all the tests are stored from `integration_test` to `patrol_test`. After doing so, we then found out that our devtools extension is not found when running tests.

Image

### Notes
DevTools root detection uses packageRootFromFileUriString, which only recognizes lib, bin, integration_test, test, benchmark, example as valid top‑level dirs. Custom test dirs like patrol_test/ are not recognized, so the root resolves incorrectly and package_config.json lookup fails.

Would it be possible to make it more configurable so that we could point to `patrol_test` directory in our case?

贡献指南

打开贡献指南

调研方向

Start with DevTools' packageRootFromFileUriString root-detection logic and trace how it finds package_config.json for an entrypoint under patrol_test/. Compare that behavior with recognized directories such as integration_test/ and test/. Done means DevTools can discover extensions when the app entrypoint is under a custom test directory, while preserving existing root detection.

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

评估

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

把新 issue 发到你的邮箱

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