Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions src/rust/process_execution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,6 @@ fn maybe_make_wrapper_script(
Ok(Some(script))
}

#[allow(deprecated)] // TODO: Move to REAPI `output_path` instead of `output_files` and `output_directories`.
pub async fn make_execute_request(
req: &Process,
instance_name: Option<String>,
Expand Down Expand Up @@ -1398,29 +1397,27 @@ pub async fn make_execute_request(
});
}

let mut output_files = req
.output_files
.iter()
.map(|p| {
p.to_str()
.map(str::to_owned)
.ok_or_else(|| format!("Non-UTF8 output file path: {p:?}"))
})
.collect::<Result<Vec<String>, String>>()?;
output_files.sort();
command.output_files = output_files;

let mut output_directories = req
.output_directories
.iter()
.map(|p| {
p.to_str()
.map(str::to_owned)
.ok_or_else(|| format!("Non-UTF8 output directory path: {p:?}"))
})
.collect::<Result<Vec<String>, String>>()?;
output_directories.sort();
command.output_directories = output_directories;
let output_paths = {
let mut output_paths = req
.output_files
.iter()
.map(|p| {
p.to_str()
.map(str::to_owned)
.ok_or_else(|| format!("Non-UTF8 output file path: {p:?}"))
})
.chain(req.output_directories.iter().map(|p| {
p.to_str()
.map(str::to_owned)
.ok_or_else(|| format!("Non-UTF8 output directory path: {p:?}"))
}))
.collect::<Result<HashSet<String>, String>>()?
.into_iter()
.collect::<Vec<String>>();
output_paths.sort();
output_paths
};
command.output_paths = output_paths;

if let Some(working_directory) = &req.working_directory {
// Do not set `working_directory` if a wrapper script is in use because the wrapper script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,8 @@ message Command {
// DEPRECATED as of v2.2: platform properties are now specified directly in
// the action. See documentation note in the
// [Action][build.bazel.remote.execution.v2.Action] for migration.
Platform platform = 5 [ deprecated = true ];
//Platform platform = 5 [ deprecated = true ];
Platform platform = 5;

// The working directory, relative to the input root, for the command to run
// in. It must be a directory which exists in the input tree. If it is left
Expand Down
Loading
Loading