flutter/packages/flutter_tools/lib/src
auto-submit[bot] 8df62188f0
Reverts "Use coverage.collect's coverableLineCache param to speed up coverage" (#137121)
Reverts flutter/flutter#136851
Initiated by: CaseyHillers
This change reverts the following previous change:
Original Description:
One of the reasons gathering coverage information is expensive is that we have to force compile every function in the libraries we're interested in. Without this, functions that haven't been invoked (so haven't been compiled) won't have any line number information, so the coverage tool doesn't know which lines to add to the list of misses. In flutter's case, the test infra spawns many VMs, and each of these needs to recompile all those libraries.

To fix this, we need a way of skipping force compilation for libraries we've already seen in previous tests, without losing the information about which lines in each library are coverable. So I [added](https://github.com/dart-lang/coverage/pull/466) the `coverableLineCache` to `coverage.collect` in package:coverage v1.7.0. This cache starts out empty, but fills up with lists of all the lines that are coverable for every library as coverage is gathered. package:coverage can then tell the VM not to force compile any libraries in this cache (using `getSourceReport`'s `librariesAlreadyCompiled` param). So the first test suite will still have to compile everything, but subsequent test suites will be much faster.

This speeds up coverage collection significantly, for large test suites:

| Running flutter/packages/flutter tests... | Time | Overhead |
| --- | --- | --- |
| without coverage | 8:53 | - |
| with coverage | 20:25 | 130% |
| with `coverableLineCache` | 12:21 | 40% |

Bug: https://github.com/flutter/flutter/issues/100751
2023-10-24 02:38:27 +00:00
..
android Add --trace-to-file option to flutter run (#135713) 2023-10-12 13:23:52 -04:00
base Fix prefer_mixin TODOs (#136480) 2023-10-16 17:43:31 +00:00
build_system Default NativeAssets Darwin and IOS target archs if missing (#136948) 2023-10-20 09:28:52 -07:00
commands [flutter_tools] move build_preview_test from commands/permeable to integration shard (#136912) 2023-10-19 22:03:04 +00:00
custom_devices Add --trace-to-file option to flutter run (#135713) 2023-10-12 13:23:52 -04:00
dart Fix dart pub cache clean command on pub.dart (#128171) 2023-06-15 20:38:04 +00:00
debug_adapters [flutter_tools/dap] Improve rendering of structured errors via DAP (#131251) 2023-07-31 13:03:26 +01:00
drive Fix: use --web-launch-url and --web-hostname arguments in flutter drive (#131763) 2023-08-10 20:53:08 +00:00
fuchsia Disable Fuchsia SDK usage unless opted in (#123084) 2023-03-31 02:31:07 +00:00
intellij [flutter_tools] Fix TypeError when a FileSystemException happens during flutter doctor (#133373) 2023-09-05 18:00:07 +00:00
ios [Reland] Skip injecting Bonjour settings when port publication is disabled (#136842) 2023-10-19 17:38:52 +00:00
isolated Upgrade Flutter deps to pull in latest vm_service and dwds (#136734) 2023-10-19 18:29:02 +00:00
linux Native assets support for Windows (#134203) 2023-09-27 12:22:58 +00:00
localizations 🐛 Treat empty ARB content as empty map when decoding (#131242) 2023-08-01 01:27:54 +00:00
macos Native assets support for Windows (#134203) 2023-09-27 12:22:58 +00:00
migrations Native assets support for Windows (#134203) 2023-09-27 12:22:58 +00:00
proxied_devices Make ProxiedDevices a subclass of PollingDeviceDiscovery. (#130640) 2023-07-17 17:40:12 +00:00
reporting Update logic for getting Analytics instance from package:unified_analytics (#134756) 2023-09-29 16:20:16 +00:00
runner do not include entries from --dart-define-from-file files in the gradle config or environment during build (#136865) 2023-10-19 21:01:51 +00:00
test Reverts "Use coverage.collect's coverableLineCache param to speed up coverage" (#137121) 2023-10-24 02:38:27 +00:00
tester Native assets support for MacOS and iOS (#130494) 2023-09-10 08:07:13 +00:00
vscode [tool] In flutter doctor -v, warn when Android Studio version could not be detected. (#126395) 2023-06-01 14:51:30 +00:00
web [web] remove loading indicator in -d web-server builds (#136482) 2023-10-12 23:45:06 +00:00
windows Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
application_package.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
artifacts.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
asset.dart [web] Encode AssetManifest.bin as JSON and use that on the web. (#131382) 2023-09-19 22:38:51 +00:00
build_info.dart Default NativeAssets Darwin and IOS target archs if missing (#136948) 2023-10-20 09:28:52 -07:00
bundle_builder.dart Don't build native assets in flutter build bundle (#136641) 2023-10-18 11:57:44 +00:00
bundle.dart Remove the fast reassemble / single widget reload feature (#132255) 2023-08-10 21:48:06 +00:00
cache.dart Enable private field promotion for flutter_tools (#134474) 2023-09-12 20:20:04 +00:00
cmake_project.dart [Windows] Ensure window is shown (#127046) 2023-05-19 22:25:55 +00:00
cmake.dart Reduce usage of testUsingContext (#131078) 2023-07-24 17:22:25 +00:00
compile.dart Reland "Switch flutter_tools to run frontend server from AOT snapshot" (#136282) 2023-10-11 16:15:26 -04:00
context_runner.dart Update logic for getting Analytics instance from package:unified_analytics (#134756) 2023-09-29 16:20:16 +00:00
convert.dart Make custom Utf8Decoder replacement not extend platform class. (#123211) 2023-03-22 07:53:56 -07:00
daemon.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
dart_pub_json_formatter.dart Pub dependencies project validator (#106895) 2022-07-15 23:12:05 +00:00
desktop_device.dart Add --trace-to-file option to flutter run (#135713) 2023-10-12 13:23:52 -04:00
devfs.dart Remove the fast reassemble / single widget reload feature (#132255) 2023-08-10 21:48:06 +00:00
device_port_forwarder.dart
device.dart Support --web-header option for flutter run (#136297) 2023-10-17 19:42:01 +00:00
devtools_launcher.dart Make Logger required when injected in flutter_tool (#114111) 2022-10-27 22:40:08 +00:00
doctor_validator.dart Remove 1745 decorative breaks (#123259) 2023-03-22 21:12:22 +00:00
doctor.dart Check for simulator runtime in flutter doctor (#131795) 2023-08-04 17:14:06 +00:00
emulator.dart Reland "[tool] Move Java functions to their own file" (#126577) 2023-05-20 06:29:21 +00:00
features.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
flutter_application_package.dart [tool] Install the corresponding APK in flutter run (#113622) 2022-10-19 02:44:30 +00:00
flutter_cache.dart Allows adding a storage 'realm' to the storage base URL (#131951) 2023-08-09 23:26:05 +00:00
flutter_device_manager.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
flutter_features.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
flutter_manifest.dart Add spaces after flow control statements (#126320) 2023-05-15 11:07:30 +02:00
flutter_plugins.dart [flutter_tools] handle ERROR_INVALID_FUNCTION when trying to symlink across drives (#136424) 2023-10-12 17:15:45 +00:00
flutter_project_metadata.dart Native assets support for MacOS and iOS (#130494) 2023-09-10 08:07:13 +00:00
globals.dart Clean up analytics opt in/out flags (#132588) 2023-09-12 22:49:05 +00:00
html_utils.dart flutter-tool, web: update HTML template serviceWorkerVersion to be const (#124826) 2023-04-14 02:01:21 +00:00
http_host_validator.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
license_collector.dart [flutter_tools] refactor license collector (#128748) 2023-06-15 20:25:19 +00:00
mdns_discovery.dart New tooling for iOS 17 physical devices (#131865) 2023-08-09 19:25:12 +00:00
native_assets.dart Native assets support for Windows (#134203) 2023-09-27 12:22:58 +00:00
persistent_tool_state.dart Create a main alias for master channel. (#115388) 2022-11-16 02:49:00 +00:00
platform_plugins.dart Remove unnecessary null checks in flutter_tool (#118857) 2023-01-23 21:43:08 +00:00
plugins.dart Improve Dart plugin registration handling (#122046) 2023-03-09 21:33:38 +00:00
pre_run_validator.dart
preview_device.dart Flutter preview device (#135639) 2023-10-18 00:27:54 +00:00
project_validator_result.dart Add info project validator status (#109169) 2022-08-09 17:59:06 +00:00
project_validator.dart [Android] Add Java/AGP/Gradle incompatibility warning to flutter create (#131444) 2023-09-20 16:01:04 +00:00
project.dart [Android] Add Java/AGP/Gradle incompatibility warning to flutter create (#131444) 2023-09-20 16:01:04 +00:00
protocol_discovery.dart Remove an unnecessary assert (#129796) 2023-06-30 18:07:54 +00:00
proxy_validator.dart [tools]Build IPA validation UI Polish (#116744) 2022-12-15 14:43:32 -08:00
resident_devtools_handler.dart Enable private field promotion for flutter_tools (#134474) 2023-09-12 20:20:04 +00:00
resident_runner.dart [flutter_tools] remove VmService screenshot for native devices. (#135462) 2023-09-29 00:21:14 +00:00
run_cold.dart Reland "Fix issue where DevTools would not be immediately available when using --start-paused (#126698)" (#129368) 2023-06-28 00:16:13 +05:30
run_hot.dart Speed up native assets target (#134523) 2023-09-15 12:23:08 -07:00
sksl_writer.dart Remove 1745 decorative breaks (#123259) 2023-03-22 21:12:22 +00:00
template.dart Fix description in index.html / manifest.json getting double quoted (#131842) 2023-08-18 02:58:20 +00:00
tracing.dart Reland "Remove references to Observatory (#118577)" (#121606) 2023-02-28 11:57:04 -05:00
version.dart [flutter_tools] Fix "FormatException: Invalid date format" during version freshness check (#134088) 2023-09-06 17:22:13 +00:00
vmservice.dart Null-assert the value given to a Completer expecting a non-null value (#136776) 2023-10-18 22:19:18 +00:00
xcode_project.dart Makes scheme and target optional parameter when getting universal lin… (#134571) 2023-09-15 21:01:05 +00:00