diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-05 16:27:27 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-06 14:37:16 +0100 |
commit | a20974ba714485fe2d6fdb50340d4315d09cebbe (patch) | |
tree | e1f9a04e3fd9d4c4235de6ba35ce4b16efd9ea7a /rules | |
parent | f8937f600f797fe82b346dfeffa954bcc5f47972 (diff) | |
download | justbuild-a20974ba714485fe2d6fdb50340d4315d09cebbe.tar.gz |
Use quote and quasi-quote to simplify some expressions
Diffstat (limited to 'rules')
-rw-r--r-- | rules/CC/test/EXPRESSIONS | 17 | ||||
-rw-r--r-- | rules/EXPRESSIONS | 2 | ||||
-rw-r--r-- | rules/lint/RULES | 3 | ||||
-rw-r--r-- | rules/shell/test/RULES | 17 |
4 files changed, 16 insertions, 23 deletions
diff --git a/rules/CC/test/EXPRESSIONS b/rules/CC/test/EXPRESSIONS index b42401be..18028f8e 100644 --- a/rules/CC/test/EXPRESSIONS +++ b/rules/CC/test/EXPRESSIONS @@ -348,19 +348,16 @@ } ] , [ "artifacts" - , { "type": "map_union" + , { "type": "`" , "$1": - [ { "type": "singleton_map" - , "key": "pwd" - , "value": {"type": "BLOB", "data": "/summary"} - } - , {"type": "var", "name": "summary"} - , { "type": "singleton_map" - , "key": "work" - , "value": + { "pwd": + {"type": ",", "$1": {"type": "BLOB", "data": "/summary"}} + , "work": + { "type": "," + , "$1": {"type": "TREE", "$1": {"type": "var", "name": "attempts"}} } - ] + } } ] , [ "runfiles" diff --git a/rules/EXPRESSIONS b/rules/EXPRESSIONS index b974026e..0c1f611f 100644 --- a/rules/EXPRESSIONS +++ b/rules/EXPRESSIONS @@ -126,7 +126,7 @@ , "expression": { "type": "map_union" , "$1": - [ {"type": "singleton_map", "key": "PATH", "value": "/bin:/usr/bin"} + [ {"type": "'", "$1": {"PATH": "/bin:/usr/bin"}} , {"type": "var", "name": "ENV", "default": {"type": "empty_map"}} ] } diff --git a/rules/lint/RULES b/rules/lint/RULES index 0fba1271..0da42d2f 100644 --- a/rules/lint/RULES +++ b/rules/lint/RULES @@ -93,8 +93,7 @@ , "call_lint": ["call_lint"] , "call_summary": ["call_summary"] } - , "config_transitions": - {"targets": [{"type": "singleton_map", "key": "LINT", "value": true}]} + , "config_transitions": {"targets": [{"type": "'", "$1": {"LINT": true}}]} , "anonymous": {"lint": {"target": "targets", "provider": "lint", "rule_map": {}}} , "imports": diff --git a/rules/shell/test/RULES b/rules/shell/test/RULES index 98fdab03..3d49db21 100644 --- a/rules/shell/test/RULES +++ b/rules/shell/test/RULES @@ -310,19 +310,16 @@ } ] , [ "artifacts" - , { "type": "map_union" + , { "type": "`" , "$1": - [ { "type": "singleton_map" - , "key": "pwd" - , "value": {"type": "BLOB", "data": "/summary"} - } - , {"type": "var", "name": "summary"} - , { "type": "singleton_map" - , "key": "work" - , "value": + { "pwd": + {"type": ",", "$1": {"type": "BLOB", "data": "/summary"}} + , "work": + { "type": "," + , "$1": {"type": "TREE", "$1": {"type": "var", "name": "attempts"}} } - ] + } } ] , [ "runfiles" |