summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_api.cpp')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_api.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
index 39000194..ea6b71b9 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_api.cpp
@@ -73,9 +73,9 @@ namespace {
return false;
}
for (auto& blob : blobs) {
- auto const info = back_map->GetReference(blob.digest);
- blob.is_exec =
- info.has_value() and IsExecutableObject(info.value()->type);
+ auto const info = back_map->GetReference(blob.GetDigest());
+ blob.SetExecutable(info.has_value() and
+ IsExecutableObject(info.value()->type));
// Collect blob and upload to other CAS if transfer size reached.
if (not UpdateContainerAndUpload(
&container,
@@ -239,7 +239,7 @@ auto BazelApi::CreateAction(
auto const& type = artifacts_info[gpos].type;
if (not FileSystemManager::WriteFileAs</*kSetEpochTime=*/true,
/*kSetWritable=*/true>(
- *blobs[pos].data, output_paths[gpos], type)) {
+ *blobs[pos].ReadContent(), output_paths[gpos], type)) {
Logger::Log(LogLevel::Warning,
"staging to output path {} failed.",
output_paths[gpos].string());
@@ -486,7 +486,7 @@ auto BazelApi::CreateAction(
-> std::optional<std::string> {
auto reader = network_->CreateReader();
if (auto blob = reader.ReadSingleBlob(artifact_info.digest)) {
- return *blob->data;
+ return *blob->ReadContent();
}
return std::nullopt;
}
@@ -520,7 +520,7 @@ auto BazelApi::CreateAction(
targets->reserve(digests.size());
for (auto blobs : reader.ReadIncrementally(&digests)) {
for (auto const& blob : blobs) {
- targets->emplace_back(*blob.data);
+ targets->emplace_back(*blob.ReadContent());
}
}
});