-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Details
When locally running analysis on the Flutter tree, after printing a success message the command hangs for a long time.
For example:
$ time dart --enable-asserts dev/bots/analyze.dart
▌10:30:39▐ STARTING ANALYSIS
▌10:30:39▐ No Double.clamp
[…]
▌10:32:49▐ Correct file names in gen_defaults.dart...
▌10:32:49▐ Analysis successful.
^C
time: 332.757s wall (34.625s u, 5.508s s)
Full command output
$ time dart --enable-asserts dev/bots/analyze.dart
▌10:30:39▐ STARTING ANALYSIS
▌10:30:39▐ No Double.clamp
▌10:30:41▐ All tool test files end in _test.dart...
▌10:30:41▐ No sync*/async*
▌10:30:42▐ No runtimeType in toString...
▌10:30:42▐ Debug mode instead of checked mode...
▌10:30:42▐ Links for creating GitHub issues
▌10:30:43▐ Unexpected binaries...
▌10:30:43▐ Trailing spaces...
▌10:30:44▐ Deprecations...
▌10:30:45▐ Goldens...
▌10:30:45▐ Skip test comments...
▌10:30:47▐ Licenses...
▌10:30:51▐ Test imports...
▌10:30:52▐ Bad imports (framework)...
▌10:30:52▐ Bad imports (tools)...
▌10:30:52▐ Internationalization...
▌10:30:53▐ Integration test timeouts...
▌10:30:53▐ null initialized debug fields...
▌10:30:53▐ Taboo words...
▌10:30:54▐ Package dependencies...
▌10:30:54▐ Package Allowlist...
▌10:30:57▐ Dart analysis...
▌10:32:21▐ Executable allowlist...
▌10:32:21▐ Dart analysis (with --watch)...
▌10:32:33▐ Snippet code...
▌10:32:42▐ Dart analysis (mega gallery)...
▌10:32:49▐ Correct file names in gen_defaults.dart...
▌10:32:49▐ Analysis successful.
^C
time: 332.757s wall (34.625s u, 5.508s s)
Here the timestamps together with the time output show the command had printed "Analysis successful." and then been hanging for about 3 minutes after that before I hit Ctrl+C to kill it.
This doesn't occur if the analysis fails; in that case it exits promptly after printing "Test failed."
Target Platform: Linux
Target OS version/browser: Debian 10
Devices: n/a
Diagnosis
On investigation, this turns out to be due to the output-suppression timer introduced in #109206 as part of cleaning up the test output. This also explains why the issue doesn't affect CI, because that output-suppression feature isn't active in CI.
I have a fix, which I'll send as a PR.