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);