summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/buildtool/build_engine/target_map/built_in_rules.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27c95c44..f0220b16 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,11 @@
Bug fixes on top of release `1.2.3`.
+### Fixes
+
+- The built-in rule `"install"` now properly enforces that the
+ resulting stage is well-formed, i.e., without tree conflicts.
+
## Release `1.2.3` (2023-11-15)
Bug fixes on top of release `1.2.2`.
diff --git a/src/buildtool/build_engine/target_map/built_in_rules.cpp b/src/buildtool/build_engine/target_map/built_in_rules.cpp
index 29eba7bf..6d55784f 100644
--- a/src/buildtool/build_engine/target_map/built_in_rules.cpp
+++ b/src/buildtool/build_engine/target_map/built_in_rules.cpp
@@ -665,6 +665,11 @@ void InstallRuleWithDeps(
stage = ExpressionPtr{Expression::map_t{stage, to_stage}};
}
+ auto conflict = BuildMaps::Target::Utils::tree_conflict(stage);
+ if (conflict) {
+ (*logger)(fmt::format("TREE conflict on subtree {}", *conflict), true);
+ return;
+ }
auto const& empty_map = Expression::kEmptyMap;
auto result = std::make_shared<AnalysedTarget const>(
TargetResult{