summaryrefslogtreecommitdiff
path: root/EXPRESSIONS
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-04-29 13:59:30 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-04-29 13:59:48 +0200
commit71e53e4c05201e97717e5fef24c6e5ce5eda980c (patch)
tree8fe88934857eb3bf7dcba476b05d75791e2f625d /EXPRESSIONS
parent124d53937a088813a95317fcd535acc0cf69024a (diff)
downloadrules-cc-71e53e4c05201e97717e5fef24c6e5ce5eda980c.tar.gz
rules: Perform disjoint map union in field_* expressions
... and replace all instances where the field_*_list variant of those expressions is used solely for the purpose of performing the disjoint union manually.
Diffstat (limited to 'EXPRESSIONS')
-rw-r--r--EXPRESSIONS8
1 files changed, 6 insertions, 2 deletions
diff --git a/EXPRESSIONS b/EXPRESSIONS
index e725606..1c2ff84 100644
--- a/EXPRESSIONS
+++ b/EXPRESSIONS
@@ -26,7 +26,8 @@
}
, "imports": {"artifacts_list": "field_artifacts_list"}
, "expression":
- { "type": "map_union"
+ { "type": "disjoint_map_union"
+ , "msg": "artifacts must not overlap"
, "$1": {"type": "CALL_EXPRESSION", "name": "artifacts_list"}
}
}
@@ -59,6 +60,7 @@
, "imports": {"runfiles_list": "field_runfiles_list"}
, "expression":
{ "type": "map_union"
+ , "msg": "runfiles must not overlap"
, "$1": {"type": "CALL_EXPRESSION", "name": "runfiles_list"}
}
}
@@ -95,7 +97,9 @@
}
, "imports": {"provider_list": "field_provider_list"}
, "expression":
- { "type": "map_union"
+ { "type": "disjoint_map_union"
+ , "msg":
+ ["Overlapping entries in provider", {"type": "var", "name": "provider"}]
, "$1":
{ "type": "let*"
, "bindings": [["default", {"type": "empty_map"}]]