From 71e53e4c05201e97717e5fef24c6e5ce5eda980c Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 29 Apr 2022 13:59:30 +0200 Subject: 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. --- EXPRESSIONS | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'EXPRESSIONS') 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"}]] -- cgit v1.2.3