DevTools extensions not discovered when app entrypoint is under custom directory

未關閉
#9,667 4 則留言 10 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
56/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
dart, devtools
領域
devtools

研究方向

從 DevTools 的 packageRootFromFileUriString 根目錄偵測邏輯開始,追蹤它如何為 patrol_test/ 下的進入點尋找 package_config.json。將該行為與 integration_test/ 和 test/ 等已識別目錄進行比較。完成的標準是:當應用程式進入點位於自訂測試目錄下時,DevTools 仍能探索擴充功能,同時保留現有的根目錄偵測行為。

由索引模型根據 Issue 內容生成。

描述

contributions welcome devtools extensions P2
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 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?

主要語言
Dart
星號
1.7k
分支
420
平均合併
3 天 11 小時
30 天內合併 PR
29

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

flutter/devtools 的其他 Issue

查看 flutter/devtools 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。