diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java index 6e8683d25bb3e4..d9133bce3a01dd 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java +++ b/src/main/java/com/google/devtools/build/lib/actions/ActionExecutionContext.java @@ -30,6 +30,7 @@ import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob.FilesystemCalls; import com.google.devtools.build.skyframe.SkyFunction.Environment; import com.google.devtools.common.options.OptionsProvider; import java.io.Closeable; @@ -74,6 +75,7 @@ public enum ShowSubcommands { private final ArtifactPathResolver pathResolver; private final NestedSetExpander nestedSetExpander; + private final FilesystemCalls syscalls; private ActionExecutionContext( Executor executor, @@ -91,7 +93,8 @@ private ActionExecutionContext( @Nullable Environment env, @Nullable FileSystem actionFileSystem, @Nullable Object skyframeDepsResult, - NestedSetExpander nestedSetExpander) { + NestedSetExpander nestedSetExpander, + FilesystemCalls syscalls) { this.actionInputFileCache = actionInputFileCache; this.actionInputPrefetcher = actionInputPrefetcher; this.actionKeyContext = actionKeyContext; @@ -111,6 +114,7 @@ private ActionExecutionContext( // executor is only ever null in testing. executor == null ? null : executor.getExecRoot()); this.nestedSetExpander = nestedSetExpander; + this.syscalls = syscalls; } public ActionExecutionContext( @@ -128,7 +132,8 @@ public ActionExecutionContext( ArtifactExpander artifactExpander, @Nullable FileSystem actionFileSystem, @Nullable Object skyframeDepsResult, - NestedSetExpander nestedSetExpander) { + NestedSetExpander nestedSetExpander, + FilesystemCalls syscalls) { this( executor, actionInputFileCache, @@ -145,7 +150,8 @@ public ActionExecutionContext( /*env=*/ null, actionFileSystem, skyframeDepsResult, - nestedSetExpander); + nestedSetExpander, + syscalls); } public static ActionExecutionContext forInputDiscovery( @@ -161,7 +167,8 @@ public static ActionExecutionContext forInputDiscovery( Map clientEnv, Environment env, @Nullable FileSystem actionFileSystem, - NestedSetExpander nestedSetExpander) { + NestedSetExpander nestedSetExpander, + FilesystemCalls syscalls) { return new ActionExecutionContext( executor, actionInputFileCache, @@ -178,7 +185,8 @@ public static ActionExecutionContext forInputDiscovery( env, actionFileSystem, /*skyframeDepsResult=*/ null, - nestedSetExpander); + nestedSetExpander, + syscalls); } public ActionInputPrefetcher getActionInputPrefetcher() { @@ -353,6 +361,15 @@ public NestedSetExpander getNestedSetExpander() { return nestedSetExpander; } + /** + * This only exists for loose header checking (and shouldn't be exist at all). + * + *

Do NOT use from any other place. + */ + public FilesystemCalls getSyscalls() { + return syscalls; + } + @Override public void close() throws IOException { // Ensure that we close both fileOutErr and actionFileSystem even if one throws. @@ -386,7 +403,8 @@ public ActionExecutionContext withFileOutErr(FileOutErr fileOutErr) { env, actionFileSystem, skyframeDepsResult, - nestedSetExpander); + nestedSetExpander, + syscalls); } /** diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java index e5478fea85c4e2..1f1169d0519813 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java @@ -86,11 +86,13 @@ import com.google.devtools.build.lib.util.Fingerprint; import com.google.devtools.build.lib.util.ShellEscaper; import com.google.devtools.build.lib.util.io.FileOutErr; +import com.google.devtools.build.lib.vfs.FileStatus; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.IORuntimeException; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.Symlinks; import com.google.devtools.build.skyframe.SkyFunction; import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.build.skyframe.SkyValue; @@ -1152,7 +1154,21 @@ private static boolean isDeclaredIn( } if (declaredIncludeDirs.contains(root.relativize(dir))) { for (Path dirOrPackage : packagesToCheckForBuildFiles) { - if (dirOrPackage.getRelative(BUILD_PATH_FRAGMENT).exists()) { + FileStatus fileStatus = null; + try { + // This file system access shouldn't exist at all and has to go away when this is + // rewritten in Starlark. + // TODO(b/187366935): Consider globbing everything eagerly instead. + fileStatus = + actionExecutionContext + .getSyscalls() + .statIfFound(dirOrPackage.getRelative(BUILD_PATH_FRAGMENT), Symlinks.FOLLOW); + } catch (IOException e) { + // Previously, we used Path.exists() to check whether the BUILD file exists. This did + // return false on any error. So by ignoring the exception are maintaining current + // behaviour. + } + if (fileStatus != null && fileStatus.isFile()) { return false; // Bad: this is a sub-package, not a subdir of a declared package. } } diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java index 5567576636ccdb..810784bf46bf9f 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java @@ -108,6 +108,7 @@ import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Root; import com.google.devtools.build.lib.vfs.Symlinks; +import com.google.devtools.build.lib.vfs.UnixGlob.FilesystemCalls; import com.google.devtools.build.skyframe.SkyFunction.Environment; import com.google.devtools.build.skyframe.SkyKey; import com.google.devtools.common.options.OptionsProvider; @@ -158,6 +159,7 @@ public void injectTree(SpecialArtifact output, TreeArtifactValue tree) { private final ActionKeyContext actionKeyContext; private final MetadataConsumerForMetrics outputArtifactsSeen; private final MetadataConsumerForMetrics outputArtifactsFromActionCache; + private final AtomicReference syscalls; private Reporter reporter; private Map clientEnv = ImmutableMap.of(); private Executor executorEngine; @@ -236,13 +238,15 @@ private enum DirectoryState { MetadataConsumerForMetrics outputArtifactsFromActionCache, AtomicReference statusReporterRef, Supplier> sourceRootSupplier, - PathFragment relativeOutputPath) { + PathFragment relativeOutputPath, + AtomicReference syscalls) { this.actionKeyContext = actionKeyContext; this.outputArtifactsSeen = outputArtifactsSeen; this.outputArtifactsFromActionCache = outputArtifactsFromActionCache; this.statusReporterRef = statusReporterRef; this.sourceRootSupplier = sourceRootSupplier; this.relativeOutputPath = relativeOutputPath; + this.syscalls = syscalls; } SharedActionCallback getSharedActionCallback( @@ -474,7 +478,8 @@ ActionExecutionValue executeAction( artifactExpander, topLevelFilesets, actionFileSystem, - skyframeDepsResult); + skyframeDepsResult, + syscalls); if (actionCacheChecker.isActionExecutionProhibited(action)) { // We can't execute an action (e.g. because --check_???_up_to_date option was used). Fail the @@ -540,7 +545,8 @@ private ActionExecutionContext getContext( ArtifactExpander artifactExpander, ImmutableMap> topLevelFilesets, @Nullable FileSystem actionFileSystem, - @Nullable Object skyframeDepsResult) + @Nullable Object skyframeDepsResult, + AtomicReference syscalls) throws InterruptedException { boolean emitProgressEvents = shouldEmitProgressEvents(action); ArtifactPathResolver artifactPathResolver = @@ -575,7 +581,8 @@ private ActionExecutionContext getContext( artifactExpander, actionFileSystem, skyframeDepsResult, - nestedSetExpander); + nestedSetExpander, + syscalls.get()); } private static void closeContext( @@ -776,7 +783,8 @@ NestedSet discoverInputs( clientEnv, env, actionFileSystem, - nestedSetExpander); + nestedSetExpander, + syscalls.get()); if (actionFileSystem != null) { updateActionFileSystemContext( action, 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 d61d2e940295b5..78809cb99ba4a3 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 @@ -455,7 +455,8 @@ protected SkyframeExecutor( outputArtifactsFromActionCache, statusReporterRef, this::getPathEntries, - PathFragment.create(directories.getRelativeOutputPath())); + PathFragment.create(directories.getRelativeOutputPath()), + syscalls); this.artifactFactory = new ArtifactFactory( /* execRootParent= */ directories.getExecRootBase(), diff --git a/src/test/java/com/google/devtools/build/lib/actions/ExecutableSymlinkActionTest.java b/src/test/java/com/google/devtools/build/lib/actions/ExecutableSymlinkActionTest.java index cbf0d52baaac75..e0a94e598983ee 100644 --- a/src/test/java/com/google/devtools/build/lib/actions/ExecutableSymlinkActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/actions/ExecutableSymlinkActionTest.java @@ -34,6 +34,7 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -81,7 +82,8 @@ private ActionExecutionContext createContext() { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java b/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java index 49304bb0fa3e27..0045d0554e9ef2 100644 --- a/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java +++ b/src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java @@ -88,6 +88,7 @@ import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob; import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; import com.google.devtools.build.skyframe.AbstractSkyFunctionEnvironment; import com.google.devtools.build.skyframe.BuildDriver; @@ -176,7 +177,8 @@ public static ActionExecutionContext createContext( : ActionInputHelper.actionGraphArtifactExpander(actionGraph), /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } public static ActionExecutionContext createContext(ExtendedEventHandler eventHandler) { @@ -196,7 +198,8 @@ public static ActionExecutionContext createContext(ExtendedEventHandler eventHan (artifact, output) -> {}, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } public static ActionExecutionContext createContextForInputDiscovery( @@ -221,7 +224,8 @@ public static ActionExecutionContext createContextForInputDiscovery( ImmutableMap.of(), new BlockingSkyFunctionEnvironment(buildDriver, eventHandler), /*actionFileSystem=*/ null, - nestedSetExpander); + nestedSetExpander, + UnixGlob.DEFAULT_SYSCALLS); } public static Artifact createArtifact(ArtifactRoot root, Path path) { diff --git a/src/test/java/com/google/devtools/build/lib/analysis/actions/FileWriteActionTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/actions/FileWriteActionTestCase.java index 7ded773d7de9ad..8ce6c099472aa4 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/actions/FileWriteActionTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/actions/FileWriteActionTestCase.java @@ -36,6 +36,7 @@ import com.google.devtools.build.lib.util.io.FileOutErr; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.util.Collection; import org.junit.Before; @@ -79,7 +80,8 @@ public final void createExecutorAndContext() throws Exception { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } protected void checkNoInputsByDefault() { diff --git a/src/test/java/com/google/devtools/build/lib/analysis/actions/ParamFileWriteActionTest.java b/src/test/java/com/google/devtools/build/lib/analysis/actions/ParamFileWriteActionTest.java index 9aa676df3db854..cf30e9d6a9a0f8 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/actions/ParamFileWriteActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/actions/ParamFileWriteActionTest.java @@ -44,6 +44,7 @@ import com.google.devtools.build.lib.util.io.FileOutErr; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.util.Collection; import java.util.List; import org.junit.Before; @@ -203,7 +204,8 @@ public void expand(Artifact artifact, Collection output) { artifactExpander, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } private enum KeyAttributes { diff --git a/src/test/java/com/google/devtools/build/lib/analysis/actions/SymlinkActionTest.java b/src/test/java/com/google/devtools/build/lib/analysis/actions/SymlinkActionTest.java index 8665a2f04ea199..4573cd44b75b79 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/actions/SymlinkActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/actions/SymlinkActionTest.java @@ -35,6 +35,7 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -100,7 +101,8 @@ public void testSymlink() throws Exception { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT)); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS)); assertThat(actionResult.spawnResults()).isEmpty(); assertThat(output.isSymbolicLink()).isTrue(); assertThat(output.resolveSymbolicLinks()).isEqualTo(input); diff --git a/src/test/java/com/google/devtools/build/lib/analysis/actions/TemplateExpansionActionTest.java b/src/test/java/com/google/devtools/build/lib/analysis/actions/TemplateExpansionActionTest.java index 60f776f84d83dc..334fbf11c5f103 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/actions/TemplateExpansionActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/actions/TemplateExpansionActionTest.java @@ -41,6 +41,7 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.nio.charset.StandardCharsets; import java.util.List; import org.junit.Before; @@ -206,7 +207,8 @@ private ActionExecutionContext createContext(Executor executor) { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } private void executeTemplateExpansion(String expected) throws Exception { diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java index fad2e480e12074..0c645beffe77c4 100644 --- a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java @@ -169,6 +169,7 @@ import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import com.google.devtools.build.lib.vfs.Root; +import com.google.devtools.build.lib.vfs.UnixGlob; import com.google.devtools.build.skyframe.ErrorInfo; import com.google.devtools.build.skyframe.InMemoryMemoizingEvaluator; import com.google.devtools.build.skyframe.MemoizingEvaluator; @@ -2450,7 +2451,8 @@ public ActionExecutionContext build() { artifactExpander, /*actionFileSystem=*/ null, /*skyframeDepsResult*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } } } diff --git a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java index 8672f92b4d3877..f3d395a9993e16 100644 --- a/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java +++ b/src/test/java/com/google/devtools/build/lib/exec/StandaloneTestStrategyTest.java @@ -68,6 +68,7 @@ import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path; +import com.google.devtools.build.lib.vfs.UnixGlob; import com.google.devtools.build.lib.view.test.TestStatus.BlazeTestStatus; import com.google.devtools.build.lib.view.test.TestStatus.TestResultData; import com.google.devtools.common.options.Options; @@ -148,7 +149,8 @@ public FakeActionExecutionContext( /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); this.actionContextRegistry = actionContextRegistry; } diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CreateIncSymlinkActionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CreateIncSymlinkActionTest.java index e06fee8cef9c67..6a7cc19810a833 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CreateIncSymlinkActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CreateIncSymlinkActionTest.java @@ -34,6 +34,7 @@ import com.google.devtools.build.lib.vfs.FileSystemUtils; 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 org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; @@ -139,7 +140,8 @@ private ActionExecutionContext makeDummyContext() { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java index e14a5e0712bc6e..73f62aaa3bb653 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java @@ -43,6 +43,7 @@ import com.google.devtools.build.lib.util.io.FileOutErr; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.PathFragment; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -103,7 +104,8 @@ public final void createExecutorAndContext() throws Exception { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java index 357329e5948fb9..11ca0ef6cb2603 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/objc/BazelJ2ObjcLibraryTest.java @@ -55,6 +55,7 @@ import com.google.devtools.build.lib.testutil.TestConstants; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.PathFragment; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.io.ByteArrayOutputStream; import org.junit.Test; import org.junit.runner.RunWith; @@ -788,7 +789,8 @@ public void testJ2ObjCCustomModuleMap() throws Exception { DUMMY_ARTIFACT_EXPANDER, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); ByteArrayOutputStream moduleMapStream = new ByteArrayOutputStream(); ByteArrayOutputStream umbrellaHeaderStream = new ByteArrayOutputStream(); moduleMapAction.newDeterministicWriter(dummyActionExecutionContext) @@ -846,7 +848,8 @@ public void testModuleMapFromGenJarTreeArtifact() throws Exception { DUMMY_ARTIFACT_EXPANDER, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); ByteArrayOutputStream moduleMapStream = new ByteArrayOutputStream(); ByteArrayOutputStream umbrellaHeaderStream = new ByteArrayOutputStream(); diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java index afc06b82f60ef9..151d07dbfd9af1 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java @@ -245,7 +245,8 @@ protected BuilderWithResult createBuilder( MetadataConsumerForMetrics.NO_OP, new AtomicReference<>(statusReporter), /*sourceRootSupplier=*/ ImmutableList::of, - PathFragment.create(directories.getRelativeOutputPath())); + PathFragment.create(directories.getRelativeOutputPath()), + new AtomicReference<>(UnixGlob.DEFAULT_SYSCALLS)); Path actionOutputBase = scratch.dir("/usr/local/google/_blaze_jrluser/FAKEMD5/action_out/"); skyframeActionExecutor.setActionLogBufferPathGenerator( diff --git a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java index 88bb1b5e865a2f..54868a70c7f697 100644 --- a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java +++ b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java @@ -60,6 +60,7 @@ import com.google.devtools.build.lib.util.io.FileOutErr; import com.google.devtools.build.lib.vfs.FileSystem; import com.google.devtools.build.lib.vfs.Path; +import com.google.devtools.build.lib.vfs.UnixGlob; import com.google.devtools.build.lib.vfs.util.FileSystems; import com.google.devtools.common.options.Options; import com.google.devtools.common.options.OptionsParser; @@ -214,7 +215,8 @@ private ActionExecutionContext createContext() { SIMPLE_ARTIFACT_EXPANDER, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } @Test diff --git a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkActionWithShadowedActionTest.java b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkActionWithShadowedActionTest.java index 303eda258e511c..3dda0f52780cc5 100644 --- a/src/test/java/com/google/devtools/build/lib/starlark/StarlarkActionWithShadowedActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/starlark/StarlarkActionWithShadowedActionTest.java @@ -38,6 +38,7 @@ import com.google.devtools.build.lib.exec.BinTools; import com.google.devtools.build.lib.exec.util.TestExecutorBuilder; import com.google.devtools.build.lib.vfs.PathFragment; +import com.google.devtools.build.lib.vfs.UnixGlob; import java.util.LinkedHashMap; import java.util.Map; import java.util.Optional; @@ -118,7 +119,8 @@ public final void createExecutorAndContext() throws Exception { /*artifactExpander=*/ null, /*actionFileSystem=*/ null, /*skyframeDepsResult=*/ null, - NestedSetExpander.DEFAULT); + NestedSetExpander.DEFAULT, + UnixGlob.DEFAULT_SYSCALLS); } @Test