-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isolateIds parameter does not work #533
Comments
This is due to isolate groups. In fact, unless you're using I can't think of a simple/efficient way of restoring the old behavior either, so the only actionable thing here is to either update the documentation or delete that arg. @gogolon Do you have a use case that requires the old behavior? |
I thought that I have a use case, but maybe I was wrong. If coverage is collected after an isolate exits (but there are other isolates running), does the report contain coverage from the isolate that exited earlier? I see that Due to my (false?) assumption, I was trying to pause the exiting isolates and collect coverage from them separately, using the |
Yeah, that makes sense to me. The coverage counters are shared between all isolates in the group, so even if one of the isolates has exited, the counters it was incrementing are still there. |
Doc comment for the
collect
function states:If [isolateIds] is set, the coverage gathering will be restricted to only those VM isolates.
This does not seem to be true. I'm trying to collect coverage from a single isolate, but the filter simply does not work and code executed on all isolates is included in the report.
Reproduction
dart create isolate_coverage_sample
bin/isolate_coverage_sample.dart
with the code below:lib/isolate_calculate.dart
containing this code:dart --pause-isolates-on-exit bin/isolate_coverage_sample.dart
package:isolate_coverage_sample/calculate.dart
is included in the coverage even though it was called on the main isolate.The text was updated successfully, but these errors were encountered: