Unverified Commit 476a4de1 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Add delay to recompile request for web (#39752)

parent 76ebcc8a
......@@ -121,6 +121,12 @@ class WebFs {
/// Recompile the web application and return whether this was successful.
Future<bool> recompile() async {
// TODO(jonahwilliams): build_daemon is still watching for sources, which means we can
// easily miss changes when hot restart is triggered by IDEs. Until we fix this, add a
// delay to allow filesystem watches to gather all required source files. This duration
// was chosen arbitrarily.
// See https://github.com/flutter/flutter/issues/39696
await Future<void>.delayed(const Duration(milliseconds: 150));
_client.startBuild();
await for (BuildResults results in _client.buildResults) {
final BuildResult result = results.results.firstWhere((BuildResult result) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment