diff options
-rw-r--r-- | rules/CC/RULES | 11 | ||||
-rw-r--r-- | rules/CC/proto/EXPRESSIONS | 27 | ||||
-rw-r--r-- | rules/EXPRESSIONS | 8 | ||||
-rw-r--r-- | rules/data/RULES | 11 |
4 files changed, 23 insertions, 34 deletions
diff --git a/rules/CC/RULES b/rules/CC/RULES index cb13f98e..0e9a6941 100644 --- a/rules/CC/RULES +++ b/rules/CC/RULES @@ -117,17 +117,14 @@ } , "artifacts_doc": ["The single tree artifact staged to the given location"] , "runfiles_doc": ["Same as artifacts"] - , "imports": {"runfiles_list": ["./", "..", "field_runfiles_list"]} + , "imports": {"runfiles": ["./", "..", "field_runfiles"]} , "expression": { "type": "let*" , "bindings": [ [ "hdrs" - , { "type": "disjoint_map_union" - , "$1": - { "type": "let*" - , "bindings": [["fieldname", "hdrs"]] - , "body": {"type": "CALL_EXPRESSION", "name": "runfiles_list"} - } + , { "type": "let*" + , "bindings": [["fieldname", "hdrs"]] + , "body": {"type": "CALL_EXPRESSION", "name": "runfiles"} } ] , [ "stage" diff --git a/rules/CC/proto/EXPRESSIONS b/rules/CC/proto/EXPRESSIONS index cb7d8a2e..4f807fe8 100644 --- a/rules/CC/proto/EXPRESSIONS +++ b/rules/CC/proto/EXPRESSIONS @@ -1,16 +1,9 @@ { "protoc-deps": - { "imports": {"provider_list": ["./", "../..", "field_provider_list"]} + { "imports": {"map_provider": ["./", "../..", "field_map_provider"]} , "expression": - { "type": "disjoint_map_union" - , "$1": - { "type": "let*" - , "bindings": - [ ["fieldname", "deps"] - , ["provider", "protoc-deps"] - , ["default", {"type": "empty_map"}] - ] - , "body": {"type": "CALL_EXPRESSION", "name": "provider_list"} - } + { "type": "let*" + , "bindings": [["fieldname", "deps"], ["provider", "protoc-deps"]] + , "body": {"type": "CALL_EXPRESSION", "name": "map_provider"} } } , "protoc-compile": @@ -18,6 +11,7 @@ , "imports": { "stage": ["", "stage_singleton_field"] , "result": ["./", "..", "lib result"] + , "artifacts": ["./", "../..", "field_artifacts"] , "artifacts_list": ["./", "../..", "field_artifacts_list"] , "protoc-deps": "protoc-deps" } @@ -49,13 +43,10 @@ , { "type": "to_subdir" , "subdir": "work" , "$1": - { "type": "disjoint_map_union" - , "$1": - { "type": "let*" - , "bindings": - [["fieldname", "well_known_protos"], ["transition", null]] - , "body": {"type": "CALL_EXPRESSION", "name": "artifacts_list"} - } + { "type": "let*" + , "bindings": + [["fieldname", "well_known_protos"], ["transition", null]] + , "body": {"type": "CALL_EXPRESSION", "name": "artifacts"} } } ] diff --git a/rules/EXPRESSIONS b/rules/EXPRESSIONS index e725606e..1c2ff84a 100644 --- a/rules/EXPRESSIONS +++ b/rules/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"}]] diff --git a/rules/data/RULES b/rules/data/RULES index 4c695e92..df6accee 100644 --- a/rules/data/RULES +++ b/rules/data/RULES @@ -14,7 +14,7 @@ , "specified in \"stage\"." ] , "runfiles_doc": ["Same as artifacts"] - , "imports": {"runfiles_list": ["./", "..", "field_runfiles_list"]} + , "imports": {"runfiles": ["./", "..", "field_runfiles"]} , "expression": { "type": "let*" , "bindings": @@ -25,12 +25,9 @@ } ] , [ "srcs" - , { "type": "disjoint_map_union" - , "$1": - { "type": "let*" - , "bindings": [["fieldname", "srcs"]] - , "body": {"type": "CALL_EXPRESSION", "name": "runfiles_list"} - } + , { "type": "let*" + , "bindings": [["fieldname", "srcs"]] + , "body": {"type": "CALL_EXPRESSION", "name": "runfiles"} } ] , [ "staged" |