summaryrefslogtreecommitdiff
path: root/src/buildtool/build_engine/target_map/target_map.cpp
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-05-10 16:45:57 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-05-12 09:10:51 +0200
commitea21bce031d679e23c27814dc6e129f4e2b1fc00 (patch)
treef2ec24763752efea1d2598fc19bd603f653af821 /src/buildtool/build_engine/target_map/target_map.cpp
parenta79c1c5b8718347047ffbed4979c696d7a10484a (diff)
downloadjustbuild-ea21bce031d679e23c27814dc6e129f4e2b1fc00.tar.gz
Ensure we also correctly handle tree conflicts between files
Not only trees, but also regular files can disallow paths reaching into them. If we have a file at a/b then another file at a/b/c is a staging conflict as well. Make our tool recognize this.
Diffstat (limited to 'src/buildtool/build_engine/target_map/target_map.cpp')
-rw-r--r--src/buildtool/build_engine/target_map/target_map.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/buildtool/build_engine/target_map/target_map.cpp b/src/buildtool/build_engine/target_map/target_map.cpp
index 2f5df0b5..4f4a087b 100644
--- a/src/buildtool/build_engine/target_map/target_map.cpp
+++ b/src/buildtool/build_engine/target_map/target_map.cpp
@@ -554,19 +554,6 @@ void withDependencies(
}
auto norm_path =
ToNormalPath(std::filesystem::path{input_path});
- if (norm_path == "." or norm_path.empty()) {
- if (val->Map().size() > 1) {
- throw Evaluator::EvaluationError{
- "input path '.' or '' for TREE is only allowed "
- "for trees with single input artifact"};
- }
- if (not artifact->Artifact().IsTree()) {
- throw Evaluator::EvaluationError{
- "input path '.' or '' for TREE must be tree "
- "artifact"};
- }
- return artifact;
- }
artifacts.emplace(std::move(norm_path), artifact->Artifact());
}
auto conflict = BuildMaps::Target::Utils::tree_conflict(val);