aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
diff options
context:
space:
mode:
authorGravatar Klaus Aehlig <aehlig@google.com>2017-02-24 16:30:15 +0000
committerGravatar Yue Gan <yueg@google.com>2017-02-27 15:05:00 +0000
commit777b30d06700f76ba580715429f3663de3fa0529 (patch)
treed3abdc6f42d04256c486270add24e5b0c5d3abbd /src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
parent25aa033ad5657a5cfa16e8307464648b9374be2d (diff)
Provide more reporting options to SkyFunctions
With more specific information to be reported by Skyfunctions, e.g., to inform the build-event protocol on missing files, the EventHandler interface is no longer enough. Therefore, provide an enriched context for reporting events. -- Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8 Reviewed-on: https://cr.bazel.build/8794 PiperOrigin-RevId: 148463437 MOS_MIGRATED_REVID=148463437
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
index 34cde7627a..ed0f862c9c 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
@@ -34,7 +34,7 @@ import com.google.devtools.build.lib.analysis.buildinfo.BuildInfoFactory;
import com.google.devtools.build.lib.analysis.config.BinTools;
import com.google.devtools.build.lib.cmdline.PackageIdentifier;
import com.google.devtools.build.lib.concurrent.Uninterruptibles;
-import com.google.devtools.build.lib.events.EventHandler;
+import com.google.devtools.build.lib.events.ExtendedEventHandler;
import com.google.devtools.build.lib.packages.Package;
import com.google.devtools.build.lib.packages.PackageFactory;
import com.google.devtools.build.lib.packages.Preprocessor;
@@ -272,7 +272,7 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor {
@Override
public void sync(
- EventHandler eventHandler,
+ ExtendedEventHandler eventHandler,
PackageCacheOptions packageCacheOptions,
Path outputBase,
Path workingDirectory,
@@ -334,17 +334,15 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor {
invalidateDeletedPackages(deletedPackages.get());
}
- /**
- * Uses diff awareness on all the package paths to invalidate changed files.
- */
+ /** Uses diff awareness on all the package paths to invalidate changed files. */
@VisibleForTesting
- public void handleDiffs(EventHandler eventHandler) throws InterruptedException {
+ public void handleDiffs(ExtendedEventHandler eventHandler) throws InterruptedException {
handleDiffs(eventHandler, /*checkOutputFiles=*/false, OptionsClassProvider.EMPTY);
}
private void handleDiffs(
- EventHandler eventHandler, boolean checkOutputFiles, OptionsClassProvider options)
- throws InterruptedException {
+ ExtendedEventHandler eventHandler, boolean checkOutputFiles, OptionsClassProvider options)
+ throws InterruptedException {
if (lastAnalysisDiscarded) {
// Values were cleared last build, but they couldn't be deleted because they were needed for
// the execution phase. We can delete them now.
@@ -415,13 +413,16 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor {
}
/**
- * Finds and invalidates changed files under path entries whose corresponding
- * {@link DiffAwareness} said all files may have been modified.
+ * Finds and invalidates changed files under path entries whose corresponding {@link
+ * DiffAwareness} said all files may have been modified.
*/
- private void handleDiffsWithMissingDiffInformation(EventHandler eventHandler,
+ private void handleDiffsWithMissingDiffInformation(
+ ExtendedEventHandler eventHandler,
TimestampGranularityMonitor tsgm,
Set<Pair<Path, DiffAwarenessManager.ProcessableModifiedFileSet>>
- pathEntriesWithoutDiffInformation, boolean checkOutputFiles) throws InterruptedException {
+ pathEntriesWithoutDiffInformation,
+ boolean checkOutputFiles)
+ throws InterruptedException {
ExternalFilesKnowledge externalFilesKnowledge =
externalFilesHelper.getExternalFilesKnowledge();
if (pathEntriesWithoutDiffInformation.isEmpty()
@@ -559,8 +560,9 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor {
}
@Override
- public void invalidateFilesUnderPathForTesting(EventHandler eventHandler,
- ModifiedFileSet modifiedFileSet, Path pathEntry) throws InterruptedException {
+ public void invalidateFilesUnderPathForTesting(
+ ExtendedEventHandler eventHandler, ModifiedFileSet modifiedFileSet, Path pathEntry)
+ throws InterruptedException {
if (lastAnalysisDiscarded) {
// Values were cleared last build, but they couldn't be deleted because they were needed for
// the execution phase. We can delete them now.
@@ -644,13 +646,13 @@ public final class SequencedSkyframeExecutor extends SkyframeExecutor {
/**
* Deletes all ConfiguredTarget values from the Skyframe cache.
*
- * <p>After the execution of this method all invalidated and marked for deletion values
- * (and the values depending on them) will be deleted from the cache.
+ * <p>After the execution of this method all invalidated and marked for deletion values (and the
+ * values depending on them) will be deleted from the cache.
*
- * <p>WARNING: Note that a call to this method leaves legacy data inconsistent with Skyframe.
- * The next build should clear the legacy caches.
+ * <p>WARNING: Note that a call to this method leaves legacy data inconsistent with Skyframe. The
+ * next build should clear the legacy caches.
*/
- private void dropConfiguredTargetsNow(final EventHandler eventHandler) {
+ private void dropConfiguredTargetsNow(final ExtendedEventHandler eventHandler) {
dropConfiguredTargets();
// Run the invalidator to actually delete the values.
try {