summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api')
-rw-r--r--src/buildtool/execution_api/common/execution_api.hpp9
-rw-r--r--src/buildtool/execution_api/local/local_api.hpp3
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_api.cpp3
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_api.hpp3
4 files changed, 12 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp
index 816b5031..661ecbf3 100644
--- a/src/buildtool/execution_api/common/execution_api.hpp
+++ b/src/buildtool/execution_api/common/execution_api.hpp
@@ -52,11 +52,14 @@ class IExecutionApi {
-> bool = 0;
/// \brief Retrieve artifacts from CAS and write to file descriptors.
- /// Tree artifacts are not resolved and instead the raw protobuf message
- /// will be written to fd.
+ /// Tree artifacts are not resolved and instead the tree object will be
+ /// pretty-printed before writing to fd. If `raw_tree` is set, pretty
+ /// printing will be omitted and the raw tree object will be written
+ /// instead.
[[nodiscard]] virtual auto RetrieveToFds(
std::vector<Artifact::ObjectInfo> const& artifacts_info,
- std::vector<int> const& fds) noexcept -> bool = 0;
+ std::vector<int> const& fds,
+ bool raw_tree) noexcept -> bool = 0;
/// \brief Upload blobs to CAS. Uploads only the blobs that are not yet
/// available in CAS, unless `skip_find_missing` is specified.
diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp
index 72b7e28c..c1cb1c57 100644
--- a/src/buildtool/execution_api/local/local_api.hpp
+++ b/src/buildtool/execution_api/local/local_api.hpp
@@ -74,7 +74,8 @@ class LocalApi final : public IExecutionApi {
[[nodiscard]] auto RetrieveToFds(
std::vector<Artifact::ObjectInfo> const& artifacts_info,
- std::vector<int> const& fds) noexcept -> bool final {
+ std::vector<int> const& fds,
+ bool /*raw_tree*/) noexcept -> bool final {
if (artifacts_info.size() != fds.size()) {
Logger::Log(LogLevel::Error,
"different number of digests and file descriptors.");
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
index 51e85176..c2893917 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
@@ -115,7 +115,8 @@ auto BazelApi::CreateAction(
[[nodiscard]] auto BazelApi::RetrieveToFds(
std::vector<Artifact::ObjectInfo> const& artifacts_info,
- std::vector<int> const& fds) noexcept -> bool {
+ std::vector<int> const& fds,
+ bool /*raw_tree*/) noexcept -> bool {
if (artifacts_info.size() != fds.size()) {
Logger::Log(LogLevel::Error,
"different number of digests and file descriptors.");
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp
index f953618e..d9619d82 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_api.hpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_api.hpp
@@ -45,7 +45,8 @@ class BazelApi final : public IExecutionApi {
[[nodiscard]] auto RetrieveToFds(
std::vector<Artifact::ObjectInfo> const& artifacts_info,
- std::vector<int> const& fds) noexcept -> bool final;
+ std::vector<int> const& fds,
+ bool raw_tree) noexcept -> bool final;
[[nodiscard]] auto Upload(BlobContainer const& blobs,
bool skip_find_missing) noexcept -> bool final;