diff options
author | 2017-06-07 17:03:52 -0400 | |
---|---|---|
committer | 2017-06-08 10:52:52 -0400 | |
commit | ff688bf287af54049f4f6d9b060fed1d2b649380 (patch) | |
tree | 216a01dd25e8ee26b4cb2fc3d579cfc872394dcc /src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | |
parent | 24d3709cd57690f5458675dc68948502a5800189 (diff) |
Make PackageFunction's strategy for handling unreadable BUILD files configurable. Add a test for the current behavior of treating an unreadable BUILD file as a package loading error.
RELNOTES: None
PiperOrigin-RevId: 158314187
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index 77d8394679..69c4bbc0e5 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -108,6 +108,7 @@ import com.google.devtools.build.lib.profiler.AutoProfiler; import com.google.devtools.build.lib.skyframe.AspectValue.AspectValueKey; import com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.FileDirtinessChecker; import com.google.devtools.build.lib.skyframe.ExternalFilesHelper.ExternalFileAction; +import com.google.devtools.build.lib.skyframe.PackageFunction.ActionOnIOExceptionReadingBuildFile; import com.google.devtools.build.lib.skyframe.PackageFunction.CacheEntryWithGlobDeps; import com.google.devtools.build.lib.skyframe.PackageLookupFunction.CrossRepositoryLabelViolationStrategy; import com.google.devtools.build.lib.skyframe.PackageLookupValue.BuildFileName; @@ -284,6 +285,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { private final List<BuildFileName> buildFilesByPriority; + private final ActionOnIOExceptionReadingBuildFile actionOnIOExceptionReadingBuildFile; + private PerBuildSyscallCache perBuildSyscallCache; private int lastConcurrencyLevel = -1; @@ -303,7 +306,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { PathFragment blacklistedPackagePrefixesFile, String productName, CrossRepositoryLabelViolationStrategy crossRepositoryLabelViolationStrategy, - List<BuildFileName> buildFilesByPriority) { + List<BuildFileName> buildFilesByPriority, + ActionOnIOExceptionReadingBuildFile actionOnIOExceptionReadingBuildFile) { // Strictly speaking, these arguments are not required for initialization, but all current // callsites have them at hand, so we might as well set them during construction. this.evaluatorSupplier = evaluatorSupplier; @@ -335,6 +339,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { this.productName = productName; this.crossRepositoryLabelViolationStrategy = crossRepositoryLabelViolationStrategy; this.buildFilesByPriority = buildFilesByPriority; + this.actionOnIOExceptionReadingBuildFile = actionOnIOExceptionReadingBuildFile; this.removeActionsAfterEvaluation.set(false); } @@ -472,7 +477,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { astCache, numPackagesLoaded, null, - packageProgress); + packageProgress, + actionOnIOExceptionReadingBuildFile); } protected SkyFunction newSkylarkImportLookupFunction( |