summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/local/local_response.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/local/local_response.hpp')
-rw-r--r--src/buildtool/execution_api/local/local_response.hpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp
index e8ffc234..93b12009 100644
--- a/src/buildtool/execution_api/local/local_response.hpp
+++ b/src/buildtool/execution_api/local/local_response.hpp
@@ -17,8 +17,8 @@
#include "src/buildtool/execution_api/common/execution_response.hpp"
#include "src/buildtool/execution_api/local/local_action.hpp"
-#include "src/buildtool/execution_api/local/local_storage.hpp"
#include "src/buildtool/file_system/file_system_manager.hpp"
+#include "src/buildtool/storage/storage.hpp"
/// \brief Response of a LocalAction.
class LocalResponse final : public IExecutionResponse {
@@ -35,8 +35,8 @@ class LocalResponse final : public IExecutionResponse {
return (output_.action.stdout_digest().size_bytes() != 0);
}
auto StdErr() noexcept -> std::string final {
- if (auto path = storage_->BlobPath(output_.action.stderr_digest(),
- /*is_executable=*/false)) {
+ if (auto path = storage_->CAS().BlobPath(output_.action.stderr_digest(),
+ /*is_executable=*/false)) {
if (auto content = FileSystemManager::ReadFile(*path)) {
return std::move(*content);
}
@@ -45,8 +45,8 @@ class LocalResponse final : public IExecutionResponse {
return {};
}
auto StdOut() noexcept -> std::string final {
- if (auto path = storage_->BlobPath(output_.action.stdout_digest(),
- /*is_executable=*/false)) {
+ if (auto path = storage_->CAS().BlobPath(output_.action.stdout_digest(),
+ /*is_executable=*/false)) {
if (auto content = FileSystemManager::ReadFile(*path)) {
return std::move(*content);
}
@@ -103,12 +103,11 @@ class LocalResponse final : public IExecutionResponse {
private:
std::string action_id_{};
LocalAction::Output output_{};
- gsl::not_null<std::shared_ptr<LocalStorage>> storage_;
+ gsl::not_null<Storage const*> storage_;
- explicit LocalResponse(
- std::string action_id,
- LocalAction::Output output,
- gsl::not_null<std::shared_ptr<LocalStorage>> storage) noexcept
+ explicit LocalResponse(std::string action_id,
+ LocalAction::Output output,
+ gsl::not_null<Storage const*> storage) noexcept
: action_id_{std::move(action_id)},
output_{std::move(output)},
storage_{std::move(storage)} {}