diff options
author | 2018-01-17 14:36:26 -0800 | |
---|---|---|
committer | 2018-01-17 14:37:59 -0800 | |
commit | ee6a6862e26704854fb08bd90912890814cc3426 (patch) | |
tree | 294eac82202e393c5baae0e357325f2488ab3cbb /src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java | |
parent | f323fb3043bc782526e0e47933efedea9c5c2ad9 (diff) |
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
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java index be3b163596..49d502b900 100644 --- a/src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java +++ b/src/test/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfTargetsUnderDirectoryFunctionTest.java @@ -28,6 +28,7 @@ import com.google.devtools.build.lib.pkgcache.FilteringPolicies; import com.google.devtools.build.lib.pkgcache.FilteringPolicy; 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.RootedPath; import com.google.devtools.build.skyframe.BuildDriver; import com.google.devtools.build.skyframe.EvaluationResult; @@ -54,7 +55,7 @@ public class PrepareDepsOfTargetsUnderDirectoryFunctionTest extends BuildViewTes private SkyKey createCollectPackagesKey( Path root, PathFragment rootRelativePath, ImmutableSet<PathFragment> excludedPaths) { - RootedPath rootedPath = RootedPath.toRootedPath(root, rootRelativePath); + RootedPath rootedPath = RootedPath.toRootedPath(Root.fromPath(root), rootRelativePath); return CollectPackagesUnderDirectoryValue.key( RepositoryName.MAIN, rootedPath, excludedPaths); } @@ -65,14 +66,14 @@ public class PrepareDepsOfTargetsUnderDirectoryFunctionTest extends BuildViewTes private SkyKey createPrepDepsKey(Path root, PathFragment rootRelativePath, ImmutableSet<PathFragment> excludedPaths) { - RootedPath rootedPath = RootedPath.toRootedPath(root, rootRelativePath); + RootedPath rootedPath = RootedPath.toRootedPath(Root.fromPath(root), rootRelativePath); return PrepareDepsOfTargetsUnderDirectoryValue.key( RepositoryName.MAIN, rootedPath, excludedPaths); } private SkyKey createPrepDepsKey(Path root, PathFragment rootRelativePath, ImmutableSet<PathFragment> excludedPaths, FilteringPolicy filteringPolicy) { - RootedPath rootedPath = RootedPath.toRootedPath(root, rootRelativePath); + RootedPath rootedPath = RootedPath.toRootedPath(Root.fromPath(root), rootRelativePath); return PrepareDepsOfTargetsUnderDirectoryValue.key( RepositoryName.MAIN, rootedPath, excludedPaths, filteringPolicy); } |