DevTools extensions not discovered when app entrypoint is under custom directory

オープン
#9,667 コメント 4 件 リアクション 10 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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時間
マージ済み PR(30日)
29

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flutter/devtools のほかの issue

flutter/devtools の issue をすべて見る

似ている issue

Dart の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。