diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-03 15:38:53 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-07 11:53:52 +0200 |
commit | b9147ac25ad5b398f928a2bbc39b9124e9626bf3 (patch) | |
tree | cc84e1e98cfe8ad98831e5da62fe592c413e3d4b /src/buildtool/execution_api/local/local_api.hpp | |
parent | 14bbf74ab66e9926f0f606c08b04f83b3c379b37 (diff) | |
download | justbuild-b9147ac25ad5b398f928a2bbc39b9124e9626bf3.tar.gz |
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.
Diffstat (limited to 'src/buildtool/execution_api/local/local_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_api.hpp | 28 |
1 files changed, 0 insertions, 28 deletions
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</* kOwner= */ true>(file_path) - .has_value(); - case ObjectType::Symlink: - case ObjectType::File: - return storage_->CAS() - .StoreBlob</* kOwner= */ true>(file_path, - /* is_executable= */ false) - .has_value(); - case ObjectType::Executable: - return storage_->CAS() - .StoreBlob</* kOwner= */ true>(file_path, - /* is_executable= */ true) - .has_value(); - } - Ensures(false); // unreachable - return false; - } - [[nodiscard]] auto UploadTree( std::vector<DependencyGraph::NamedArtifactNodePtr> const& artifacts) noexcept -> std::optional<ArtifactDigest> final { |