summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-08-01 10:40:30 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-08-07 14:43:19 +0200
commit7012f6c0762cf11e7b1c22304f8fb0b3b330cd0a (patch)
treeaacc6566fc6cd83b53e339211d9267311895e051 /src
parentdeef657f5615432f207c13bad969f8ed686a86ce (diff)
downloadjustbuild-7012f6c0762cf11e7b1c22304f8fb0b3b330cd0a.tar.gz
Remove code duplication in Populate method in responses.
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/execution_api/local/local_response.hpp26
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_response.cpp26
2 files changed, 0 insertions, 52 deletions
diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp
index d0ad27bd..4871097a 100644
--- a/src/buildtool/execution_api/local/local_response.hpp
+++ b/src/buildtool/execution_api/local/local_response.hpp
@@ -160,32 +160,6 @@ class LocalResponse final : public IExecutionResponse {
}
}
- // collect all symlinks and store them
- for (auto const& link : action_result.output_file_symlinks()) {
- try {
- artifacts.emplace(
- link.path(),
- Artifact::ObjectInfo{
- .digest = ArtifactDigest::Create<ObjectType::File>(
- storage_.GetHashFunction(), link.target()),
- .type = ObjectType::Symlink});
- } catch (...) {
- return false;
- }
- }
- for (auto const& link : action_result.output_directory_symlinks()) {
- try {
- artifacts.emplace(
- link.path(),
- Artifact::ObjectInfo{
- .digest = ArtifactDigest::Create<ObjectType::File>(
- storage_.GetHashFunction(), link.target()),
- .type = ObjectType::Symlink});
- } catch (...) {
- return false;
- }
- }
-
// collect directories and store them
for (auto const& dir : action_result.output_directories()) {
try {
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
index 7db88a08..ae9f00e3 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
@@ -122,32 +122,6 @@ auto BazelResponse::Populate() noexcept -> bool {
}
}
- // collect all symlinks and store them
- for (auto const& link : action_result.output_file_symlinks()) {
- try {
- artifacts.emplace(
- link.path(),
- Artifact::ObjectInfo{
- .digest = ArtifactDigest::Create<ObjectType::File>(
- network_->GetHashFunction(), link.target()),
- .type = ObjectType::Symlink});
- } catch (...) {
- return false;
- }
- }
- for (auto const& link : action_result.output_directory_symlinks()) {
- try {
- artifacts.emplace(
- link.path(),
- Artifact::ObjectInfo{
- .digest = ArtifactDigest::Create<ObjectType::File>(
- network_->GetHashFunction(), link.target()),
- .type = ObjectType::Symlink});
- } catch (...) {
- return false;
- }
- }
-
if (not Compatibility::IsCompatible()) {
// in native mode: just collect and store tree digests
for (auto const& tree : action_result.output_directories()) {