Search in sources :

Example 1 with FilesetActionContext

use of com.google.devtools.build.lib.rules.fileset.FilesetActionContext in project bazel by bazelbuild.

the class SpawnHelpers method mountFilesFromFilesetManifests.

/** Mount all files that the spawn needs as specified in its fileset manifests. */
void mountFilesFromFilesetManifests(Map<PathFragment, Path> mounts, Spawn spawn, ActionExecutionContext executionContext) throws IOException {
    final FilesetActionContext filesetContext = executionContext.getExecutor().getContext(FilesetActionContext.class);
    for (Artifact fileset : spawn.getFilesetManifests()) {
        File manifestFile = new File(execRoot.getPathString(), AnalysisUtils.getManifestPathFromFilesetPath(fileset.getExecPath()).getPathString());
        PathFragment targetDirectory = fileset.getExecPath();
        parseManifestFile(execRoot.getFileSystem(), mounts, targetDirectory, manifestFile, true, filesetContext.getWorkspaceName());
    }
}
Also used : PathFragment(com.google.devtools.build.lib.vfs.PathFragment) FilesetActionContext(com.google.devtools.build.lib.rules.fileset.FilesetActionContext) File(java.io.File) Artifact(com.google.devtools.build.lib.actions.Artifact)

Aggregations

Artifact (com.google.devtools.build.lib.actions.Artifact)1 FilesetActionContext (com.google.devtools.build.lib.rules.fileset.FilesetActionContext)1 PathFragment (com.google.devtools.build.lib.vfs.PathFragment)1 File (java.io.File)1