You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it help if the driver printed the target file and the test file it is about to use for the test? Using your examples the output would look like this:
$ flutter drive --profile
Will use:
target: lib/main.dart
test : test_driver/main_test.dart
Test file not found: test_driver/main_test.dart
$ flutter drive --profile -t test_driver/main.dart
Will use:
target: test_driver/main.dart
test : test_driver/main_test.dart
Target file "test_driver/main.dart" not found.
$ flutter drive --profile -t test_driver/scroll_perf.dart
Will use:
target: test_driver/scroll_perf.dart
test : test_driver/scroll_perf_test.dart
Starting application: test_driver/scroll_perf.dart
$ flutter drive --profile -t test_driver/scroll_perf_test.dart
Will use:
target: test_driver/scroll_perf_test.dart
test : test_driver/scroll_perf_test_test.dart
Test file not found: test_driver/scroll_perf_test_test.dart
I expected the syntax to be flutter drive <target> -t <test> or flutter drive <test> -t <target> or some such, with maybe the test defaulting to something based on the target. (Note that we've dropped -t from most other commands, but then they only care about one file usually.)
One thing that we should improve when we look at this is the test should know what the target was, that way when it gives error messages (e.g. the one you get after a timeout) it could use the actual correct filename. (That error messages said it's "often lib/main.dart", but that seems false since the target is chosen based on what test is run.)
@Hixie, after you introduced --driver option this might be less of an issue. One no longer needs to rely on the convention how flutter drive finds files and specify them explicitly (the messages are only confusing because you need to be aware of the default behavior).
In fact, I'm tempted to remove the convention entirely. flutter driver is not a frequently-used command (0.16% according to analytics). So the convention does not seem to add much value.
As for syntax dependency, the convention is to use the --machine option for commands that support it. We might want to discourage machine consumption of our tools' human-readable output.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Hixie commentedon Sep 9, 2016
(
flutter drive --helpdoesn't illuminate, either)yjbanov commentedon Sep 13, 2016
Would it help if the driver printed the target file and the test file it is about to use for the test? Using your examples the output would look like this:
The following should be made illegal:
flutter driver --helpshould be expanded to explain what is "target" and what is "test".Hixie commentedon Sep 15, 2016
I expected the syntax to be
flutter drive <target> -t <test>orflutter drive <test> -t <target>or some such, with maybe the test defaulting to something based on the target. (Note that we've dropped-tfrom most other commands, but then they only care about one file usually.)Hixie commentedon Oct 10, 2016
One thing that we should improve when we look at this is the test should know what the target was, that way when it gives error messages (e.g. the one you get after a timeout) it could use the actual correct filename. (That error messages said it's "often lib/main.dart", but that seems false since the target is chosen based on what test is run.)
Hixie commentedon Jan 17, 2018
@yjbanov If we're going to change this we should probably do it relatively soon because otherwise people might end up depending on the syntax here.
yjbanov commentedon Mar 20, 2018
@Hixie, after you introduced
--driveroption this might be less of an issue. One no longer needs to rely on the convention howflutter drivefinds files and specify them explicitly (the messages are only confusing because you need to be aware of the default behavior).In fact, I'm tempted to remove the convention entirely.
flutter driveris not a frequently-used command (0.16% according to analytics). So the convention does not seem to add much value.As for syntax dependency, the convention is to use the
--machineoption for commands that support it. We might want to discourage machine consumption of our tools' human-readable output.Roll engine to 482469b.
Roll engine to 482469b.
matanlurey commentedon Jun 27, 2025
Tools team is closing this as a not-planned improvement (we made some minor improvements other years).
github-actions commentedon Jul 11, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.