dart-sdk/utils
Jacob MacDonald 4551080062 Add retry logic for incremental compiler initialization.
Problem:

We have been having a lot of reports of failures when initializing the incremental compiler
(see https://github.com/dart-lang/sdk/issues/38102).

These appear to be the result of empty kernel files but we have added other logic to check
for that when kernel files are written, which has had zero reports of throwing from users
(https://github.com/dart-lang/build/pull/2387).

We also use the same mechanism for temp directory management as we did with analyzer, but only
see this problem with the switch to kernel, and specifically the incremental compiler.

Solution:

Add retry logic and see if that fixes the problem. Any time there is a retry log a warning
so that we don't just silently do retries all the time.

This is a general defensive mechanism to cover a broad spectrum of potential failures with the
incremental compiler in the wild. I don't intend to remove it as it isn't harmful, and the
warning logs should be enough to encourage issues to be filed if it is happening often.

I have no direct reason to believe this will actually solve the particular linked problem other
than that we only see this issue when the incremental compiler is enabled.

Bug: https://github.com/dart-lang/sdk/issues/39122, https://github.com/dart-lang/sdk/issues/38102
Change-Id: Iaabb4497d6da69684692c1d7b9c030c59ebc6072
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123001
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
2019-10-31 16:57:44 +00:00
..
analysis_server [analyzer] add more inputs to the analysis server GN build 2019-10-16 22:43:59 +00:00
bazel Add retry logic for incremental compiler initialization. 2019-10-31 16:57:44 +00:00
compiler Reland "[build] Speed up debug and simulator builds by running steps on the prebuilt VM." 2019-09-18 02:53:44 +00:00
dart2native Revert "Revert "Add dart2native tool for building either an aot file or a stand-alone executable."" 2019-09-05 14:46:43 +00:00
dartanalyzer [vm] Revert 1db1ac4863. 2019-05-08 23:52:29 +00:00
dartdevc [dartdevc] Update URI for libraries.json to use multi-root 2019-10-21 20:40:28 +00:00
dartdoc [VM/SDK] Switch kernel isolate to run in Dart 2 mode 2018-08-21 20:28:06 +00:00
dartfix Add a script and target to run dartfix 2019-10-14 15:50:21 +00:00
dartfmt [VM/SDK] Switch kernel isolate to run in Dart 2 mode 2018-08-21 20:28:06 +00:00
gen_kernel [SDK] Adds build targets, wrappers and SDK builds for Dart AOT. 2019-04-05 13:23:44 +00:00
kernel-service [flutter] split frontend_server from vm package 2019-10-08 05:32:59 +00:00
peg Spelling fixes e to i. 2017-06-24 13:41:39 +02:00
pub [VM/SDK] Switch kernel isolate to run in Dart 2 mode 2018-08-21 20:28:06 +00:00
tests/peg [infra] Keep comments intact when updating status files. 2018-04-10 19:03:21 +00:00
application_snapshot.gni [build] Remove dart_host_toolchain. 2019-09-27 21:14:11 +00:00
compile_platform.gni [ VM / Service ] Dynamically load source from linked-in platform kernel 2019-02-21 18:22:39 +00:00
create_timestamp.gni Make list_files.py and list_dart_files.py return absolute paths for GN 2016-12-13 10:01:28 -08:00