diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-27 13:27:06 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 13:32:39 +0200 |
commit | 9f5dcef077a3db2f6c791e403e5036f6464c9576 (patch) | |
tree | 5e14f016207af83a8d0458a7ffe960ecba56280d /src/buildtool/execution_api/local/local_response.hpp | |
parent | 0d8a4ad15b93283cc31787b039051b9e9a285ba8 (diff) | |
download | justbuild-9f5dcef077a3db2f6c791e403e5036f6464c9576.tar.gz |
Pass StorageConfig and Storage to LocalApi
Diffstat (limited to 'src/buildtool/execution_api/local/local_response.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_response.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp index bcb98a2e..30d47ca7 100644 --- a/src/buildtool/execution_api/local/local_response.hpp +++ b/src/buildtool/execution_api/local/local_response.hpp @@ -42,8 +42,8 @@ class LocalResponse final : public IExecutionResponse { return (output_.action.stdout_digest().size_bytes() != 0); } auto StdErr() noexcept -> std::string final { - if (auto path = storage_->CAS().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); } @@ -52,8 +52,8 @@ class LocalResponse final : public IExecutionResponse { return {}; } auto StdOut() noexcept -> std::string final { - if (auto path = storage_->CAS().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); } @@ -87,7 +87,7 @@ class LocalResponse final : public IExecutionResponse { private: std::string action_id_{}; LocalAction::Output output_{}; - gsl::not_null<Storage const*> storage_; + Storage const& storage_; ArtifactInfos artifacts_{}; DirSymlinks dir_symlinks_{}; bool populated_{false}; @@ -98,7 +98,7 @@ class LocalResponse final : public IExecutionResponse { gsl::not_null<Storage const*> const& storage) noexcept : action_id_{std::move(action_id)}, output_{std::move(output)}, - storage_{storage} {} + storage_{*storage} {} [[nodiscard]] auto Populate() noexcept -> bool { if (populated_) { |