From b9147ac25ad5b398f928a2bbc39b9124e9626bf3 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Mon, 3 Jun 2024 15:38:53 +0200 Subject: Remove unused code. IExecutionApi::UploadFile was introduced to handle adding of a temporary file to the storage. The call was redirected to LocalCAS internal methods that do the similar thing, so this virtual method can be removed. --- src/buildtool/execution_api/local/local_api.hpp | 28 ------------------------- 1 file changed, 28 deletions(-) (limited to 'src/buildtool/execution_api/local/local_api.hpp') diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index 75ad97bc..035b14e9 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -287,34 +287,6 @@ class LocalApi final : public IExecutionApi { return true; } - [[nodiscard]] auto UploadFile(std::filesystem::path const& file_path, - ObjectType type) noexcept -> bool override { - Logger::Log(LogLevel::Trace, [&file_path, &type]() { - return fmt::format("Storing {} of type {} directly to CAS.", - file_path.string(), - ToChar(type)); - }); - switch (type) { - case ObjectType::Tree: - return storage_->CAS() - .StoreTree(file_path) - .has_value(); - case ObjectType::Symlink: - case ObjectType::File: - return storage_->CAS() - .StoreBlob(file_path, - /* is_executable= */ false) - .has_value(); - case ObjectType::Executable: - return storage_->CAS() - .StoreBlob(file_path, - /* is_executable= */ true) - .has_value(); - } - Ensures(false); // unreachable - return false; - } - [[nodiscard]] auto UploadTree( std::vector const& artifacts) noexcept -> std::optional final { -- cgit v1.2.3