From ff64da82ceca86fca0c971c36041340bdf166010 Mon Sep 17 00:00:00 2001 From: djasper Date: Tue, 26 Jan 2021 03:20:07 -0800 Subject: [PATCH] Simplify the decision on whether to do remote include extraction. If we are using an output service and am dealing with an output file, then the file will likely be remote. RELNOTES: None. PiperOrigin-RevId: 353832834 --- .../build/lib/includescanning/SpawnIncludeScanner.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java b/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java index 74c0c9125728f4..fddd42fbeb4ef5 100644 --- a/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java +++ b/src/main/java/com/google/devtools/build/lib/includescanning/SpawnIncludeScanner.java @@ -130,8 +130,7 @@ public boolean shouldParseRemotely(Artifact file, ActionExecutionContext ctx) th // Files written remotely that are not locally available should be scanned remotely to avoid the // bandwidth and disk space penalty of bringing them across. Also, enable include scanning // remotely when explicitly directed to via a flag. - if (remoteExtractionThreshold == 0 - || (outputService != null && outputService.isRemoteFile(file))) { + if (remoteExtractionThreshold == 0 || (outputService != null && !file.isSourceArtifact())) { return true; } FileStatus status = syscallCache.get().statIfFound(file.getPath(), Symlinks.FOLLOW);