From ee6a6862e26704854fb08bd90912890814cc3426 Mon Sep 17 00:00:00 2001 From: tomlu Date: Wed, 17 Jan 2018 14:36:26 -0800 Subject: Introduce Root class. This class represents a root (such as a package path or an output root) used for file lookups and artifacts. It is meant to be as opaque as possible in order to hide the user's environment from sky keys and sky functions. Roots are used by RootedPaths and ArtifactRoots. This CL attempts to make the minimum number of modifications necessary to change RootedPath and ArtifactRoot to use these fields. Deprecated methods and invasive accessors are permitted to minimise the risk of any observable changes. RELNOTES: None PiperOrigin-RevId: 182271759 --- .../google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java') 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 8595811ec5..27e95b58bb 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 @@ -75,6 +75,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.PathFragment; +import com.google.devtools.build.lib.vfs.Root; import com.google.devtools.build.skyframe.CycleInfo; import com.google.devtools.build.skyframe.ErrorInfo; import com.google.devtools.build.skyframe.EvaluationProgressReceiver; @@ -160,7 +161,7 @@ public abstract class TimestampBuilderTestCase extends FoundationTestCase { new AtomicReference<>( new PathPackageLocator( outputBase, - ImmutableList.of(rootDirectory), + ImmutableList.of(Root.fromPath(rootDirectory)), BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY)); AtomicReference tsgmRef = new AtomicReference<>(tsgm); BlazeDirectories directories = @@ -324,7 +325,7 @@ public abstract class TimestampBuilderTestCase extends FoundationTestCase { Artifact createSourceArtifact(FileSystem fs, String name) { Path root = fs.getPath(TestUtils.tmpDir()); - return new Artifact(PathFragment.create(name), ArtifactRoot.asSourceRoot(root)); + return new Artifact(PathFragment.create(name), ArtifactRoot.asSourceRoot(Root.fromPath(root))); } protected Artifact createDerivedArtifact(String name) { -- cgit v1.2.3