Skip to content

Commit

Permalink
Do not pre-cache changed files under managed directories
Browse files Browse the repository at this point in the history
Closes #8337.

PiperOrigin-RevId: 248530274
  • Loading branch information
irengrig authored and aehlig committed May 23, 2019
1 parent 342664e commit 1d889e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ public SkyValueDirtinessChecker.DirtyResult check(
return SkyValueDirtinessChecker.DirtyResult.notDirty(oldValue);
}
FileType fileType = externalFilesHelper.getAndNoteFileType((RootedPath) skyKey.argument());
if (fileType == FileType.EXTERNAL_REPO) {
if (fileType == FileType.EXTERNAL_REPO
|| fileType == FileType.EXTERNAL_IN_MANAGED_DIRECTORY) {
// Files under output_base/external have a dependency on the WORKSPACE file, so we don't add
// a new SkyValue to the graph yet because it might change once the WORKSPACE file has been
// parsed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,15 @@ private void handleDiffsWithMissingDiffInformation(
ExternalFilesHelper tmpExternalFilesHelper =
externalFilesHelper.cloneWithFreshExternalFilesKnowledge();
// See the comment for FileType.OUTPUT for why we need to consider output files here.
EnumSet<FileType> fileTypesToCheck = checkOutputFiles
? EnumSet.of(FileType.EXTERNAL, FileType.EXTERNAL_REPO, FileType.OUTPUT)
: EnumSet.of(FileType.EXTERNAL, FileType.EXTERNAL_REPO);
EnumSet<FileType> fileTypesToCheck =
checkOutputFiles
? EnumSet.of(
FileType.EXTERNAL,
FileType.EXTERNAL_REPO,
FileType.EXTERNAL_IN_MANAGED_DIRECTORY,
FileType.OUTPUT)
: EnumSet.of(
FileType.EXTERNAL, FileType.EXTERNAL_REPO, FileType.EXTERNAL_IN_MANAGED_DIRECTORY);
logger.info(
"About to scan skyframe graph checking for filesystem nodes of types "
+ Iterables.toString(fileTypesToCheck));
Expand Down

0 comments on commit 1d889e3

Please sign in to comment.