DevTools extensions not discovered when app entrypoint is under custom directory

Đang mở
#9,667 4 bình luận 10 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
56/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
dart, devtools
Lĩnh vực
devtools

Hướng nghiên cứu

Bắt đầu với logic phát hiện root của packageRootFromFileUriString trong DevTools và theo dõi cách nó tìm package_config.json cho một entrypoint nằm dưới patrol_test/. So sánh hành vi đó với các thư mục được nhận diện như integration_test/ và test/. Hoàn thành khi DevTools có thể phát hiện các extension khi entrypoint của app nằm dưới một thư mục test tùy chỉnh, đồng thời giữ nguyên việc phát hiện root hiện có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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?

Ngôn ngữ chính
Dart
Star
1.7k
Fork
420
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flutter/devtools

Tất cả issue của flutter/devtools

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.