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
dartdevc [dartdevc] Update URI for libraries.json to use multi-root 2019-10-21 20:40:28 +00:00
dartdoc
dartfix Add a script and target to run dartfix 2019-10-14 15:50:21 +00:00
dartfmt
gen_kernel
kernel-service [flutter] split frontend_server from vm package 2019-10-08 05:32:59 +00:00
peg
pub
tests/peg
application_snapshot.gni [build] Remove dart_host_toolchain. 2019-09-27 21:14:11 +00:00
compile_platform.gni
create_timestamp.gni