flutter / flutter/devtools

DevTools extensions not discovered when app entrypoint is under custom directory

Offen
#9,667 4 Kommentare 10 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
contributions welcome devtools extensions P2
Vorherrschende Sprache
Dart
Sterne
1.7k
Forks
404
Ø Merge
6 T. 17 Std.
Gemergte PRs (30 T.)
18

Beschreibung

### 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?

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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