Search in sources :

Example 1 with BasicFilesystemDirtinessChecker

use of com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.BasicFilesystemDirtinessChecker in project bazel by bazelbuild.

the class SequencedSkyframeExecutor method invalidateFilesUnderPathForTesting.

@Override
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.
        dropConfiguredTargetsNow(eventHandler);
        lastAnalysisDiscarded = false;
    }
    TimestampGranularityMonitor tsgm = this.tsgm.get();
    Differencer.Diff diff;
    if (modifiedFileSet.treatEverythingAsModified()) {
        diff = new FilesystemValueChecker(tsgm, null).getDirtyKeys(memoizingEvaluator.getValues(), new BasicFilesystemDirtinessChecker());
    } else {
        diff = getDiff(tsgm, modifiedFileSet.modifiedSourceFiles(), pathEntry);
    }
    syscalls.set(getPerBuildSyscallCache(/*concurrencyLevel=*/
    42));
    recordingDiffer.invalidate(diff.changedKeysWithoutNewValues());
    recordingDiffer.inject(diff.changedKeysWithNewValues());
    // Blaze invalidates transient errors on every build.
    invalidateTransientErrors();
}
Also used : BasicFilesystemDirtinessChecker(com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.BasicFilesystemDirtinessChecker) TimestampGranularityMonitor(com.google.devtools.build.lib.util.io.TimestampGranularityMonitor) Differencer(com.google.devtools.build.skyframe.Differencer) RecordingDifferencer(com.google.devtools.build.skyframe.RecordingDifferencer)

Aggregations

BasicFilesystemDirtinessChecker (com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.BasicFilesystemDirtinessChecker)1 TimestampGranularityMonitor (com.google.devtools.build.lib.util.io.TimestampGranularityMonitor)1 Differencer (com.google.devtools.build.skyframe.Differencer)1 RecordingDifferencer (com.google.devtools.build.skyframe.RecordingDifferencer)1