diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/packages/GlobCache.java | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java b/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java index 460e20b08d..e62446ad0a 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java +++ b/src/main/java/com/google/devtools/build/lib/packages/GlobCache.java @@ -25,7 +25,6 @@ import com.google.devtools.build.lib.cmdline.PackageIdentifier; import com.google.devtools.build.lib.concurrent.ThreadSafety; import com.google.devtools.build.lib.util.Pair; import com.google.devtools.build.lib.vfs.Path; -import com.google.devtools.build.lib.vfs.Symlinks; import com.google.devtools.build.lib.vfs.UnixGlob; import java.io.IOException; @@ -114,28 +113,9 @@ public class GlobCache { if (directory.equals(packageDirectory)) { return true; } - PackageIdentifier subPackageId = PackageIdentifier.create( packageId.getRepository(), packageId.getPackageFragment().getRelative(directory.relativeTo(packageDirectory))); - UnixGlob.FilesystemCalls syscalls = GlobCache.this.syscalls.get(); - if (syscalls != UnixGlob.DEFAULT_SYSCALLS) { - // This is needed because in case the BUILD file exists, we do not call readdir() on its - // directory. However, the package needs to be re-evaluated if the BUILD file is removed. - // Therefore, we add this BUILD file to our dependencies by statting it through the - // recording syscall object so that the BUILD file itself is added to the dependencies of - // this package. - // - // The stat() call issued by locator.getBuildFileForPackage() does not quite cut it - // because 1. it is cached so there may not be a stat() call at all and 2. even if there - // is, it does not go through the proxy in GlobCache.this.syscalls. - // - // Note that this does not cause any significant slowdown; the BUILD file cache will have - // already evaluated the very same stat, so we don't pay any I/O cost, only a cache - // lookup. - syscalls.statNullable(directory.getChild("BUILD"), Symlinks.FOLLOW); - } - return locator.getBuildFileForPackage(subPackageId) == null; } }; |