[bazel] Don't require empty linked inputs for incremental mode

Before this CL one could ask to use the incremental compiler, but not
actually get the incremental compiler because one supplied linked inputs
(and not just summary inputs).

This is an artificial limitation, and inside the compiler there are no
real difference between "linked" and "summary" inputs. "Summaries" are
marked as "external" but that's a historical hack to mark it as something
we don't want to serialize --- something that is not used in this package.

Generally, the distinction and hack should go away entirely.
Considering there is no difference in this package, a good start would be
to remove the distinction in this package, but as this package is used
both internally and externally, this CL won't do that, but will just treat
the two 'different' input types the same.

Change-Id: I11a3962d22424387eca83212d08f535da350bd1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113022
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This commit is contained in:
Jens Johansen 2019-08-22 08:31:47 +00:00 committed by commit-bot@chromium.org
parent ceaf00ebe6
commit 976877974b

View file

@ -244,9 +244,7 @@ Future<ComputeKernelResult> computeKernel(List<String> args,
fe.InitializedCompilerState state;
bool usingIncrementalCompiler = false;
bool recordUsedInputs = parsedArgs["used-inputs"] != null;
if (parsedArgs['use-incremental-compiler'] &&
linkedInputs.isEmpty &&
isWorker) {
if (parsedArgs['use-incremental-compiler'] && isWorker) {
usingIncrementalCompiler = true;
/// Build a map of uris to digests.
@ -261,7 +259,7 @@ Future<ComputeKernelResult> computeKernel(List<String> args,
_toUri(parsedArgs['dart-sdk-summary']),
_toUri(parsedArgs['packages-file']),
_toUri(parsedArgs['libraries-file']),
summaryInputs,
[...summaryInputs, ...linkedInputs],
inputDigests,
target,
fileSystem,