Open greglittlefield-wf opened 1 week ago
Interesting, I can repro it with your example, but our integration test in this repo does not have this behavior (dart run build_runner test -- -p chrome test/hello_world_test.dart test/hello_world_deferred_test.dart
from _test
). I can look into it.
It definitely is package:test which isn't exiting properly here, we never get an exit code from it.
cc @natebosch I am getting to this point https://github.com/dart-lang/test/blob/master/pkgs/test_core/lib/src/runner.dart#L161 (with success == true), but then it hangs. So, other async task seems to still be pending (likely a stream listening on some IO somewhere is still open).
I am transferring this to the test repo.
I have not been able to track this down yet. I have validated that this is unrelated to build_runner test
using DDC or a problem with the way it bootstraps test suites. This does seem to be a problem specifically with precompiled browser tests.
When there are more than one suites ran I can see the LoadSuite
for all but one of the suites stuck in the heap but I have not found any objects that have a retaining path which can point me to anything specific.
Hi, I noticed that in Dart 3, when I run multiple browser test files with the default concurrency, all the tests run properly, but the
build_runner
andtest
processes never exit.What it looks like:
I'm seeing this behavior both locally in macOS, and on GitHub Actions runs. Locally, it seems that the Chrome processes are also still open in the background.
This only seems to happen when using
build_runner
, but not when running tests directly fromtest
.It also only happens when running more than one test file, and does not occur when passing
--concurrency=1
to the test command, nor does it happen when passing--pause-after-load
. So,--concurrency=1
seems like a good workaround.I also tested the
--release
flag, and not specifying files explicitly via the command line, and those variables didn't seem to make a difference.I've set up a basic repo as a reduced test case here: https://github.com/greglittlefield-wf/build_runner_hang_repro
To reproduce the issue:
Examples of commands that don't reproduce the issue:
Versions combinations I've reproduced the issue under:
Versions that don't reproduce the issue:
I spent some time trying a Dart 2.19.6 pubspec.lock and running that in Dart 3, but there kept being incompatibilities in older versions of packages that prevented me from building, so I gave up.