summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/EXPRESSIONS113
-rw-r--r--data/RULES138
2 files changed, 0 insertions, 251 deletions
diff --git a/data/EXPRESSIONS b/data/EXPRESSIONS
deleted file mode 100644
index 929eaf8..0000000
--- a/data/EXPRESSIONS
+++ /dev/null
@@ -1,113 +0,0 @@
-{ "field_artifacts_without":
- { "doc":
- [ "Query and merge artifacts from target_field's targets,"
- , "leaving out the specified logical paths."
- ]
- , "vars": ["fieldname", "transition", "exclude"]
- , "vars_doc":
- { "fieldname": ["The name of the target_field to query."]
- , "transition": ["The optional configuration transition for the targets."]
- , "exclude": ["The logical paths to exclude"]
- }
- , "expression":
- { "type": "disjoint_map_union"
- , "msg":
- [ "artifacts"
- , {"type": "var", "name": "fieldname"}
- , "must not overlap after dropping paths"
- , {"type": "var", "name": "exclude"}
- ]
- , "$1":
- { "type": "foreach"
- , "var": "x"
- , "range":
- {"type": "FIELD", "name": {"type": "var", "name": "fieldname"}}
- , "body":
- { "type": "map_union"
- , "$1":
- { "type": "foreach_map"
- , "range":
- { "type": "DEP_ARTIFACTS"
- , "dep": {"type": "var", "name": "x"}
- , "transition":
- { "type": "var"
- , "name": "transition"
- , "default": {"type": "empty_map"}
- }
- }
- , "body":
- { "type": "if"
- , "cond":
- { "type": "lookup"
- , "key": {"type": "var", "name": "_"}
- , "map": {"type": "var", "name": "exclude"}
- }
- , "then": {"type": "empty_map"}
- , "else":
- { "type": "singleton_map"
- , "key": {"type": "var", "name": "_"}
- , "value": {"type": "var", "name": "$_"}
- }
- }
- }
- }
- }
- }
- }
-, "field_runfiles_without":
- { "doc":
- [ "Query and merge runfiles from target_field's targets,"
- , "leaving out the specified logical paths."
- ]
- , "vars": ["fieldname", "transition", "exclude"]
- , "vars_doc":
- { "fieldname": ["The name of the target_field to query."]
- , "transition": ["The optional configuration transition for the targets."]
- , "exclude": ["The logical paths to exclude"]
- }
- , "expression":
- { "type": "disjoint_map_union"
- , "msg":
- [ "artifacts"
- , {"type": "var", "name": "fieldname"}
- , "must not overlap after dropping paths"
- , {"type": "var", "name": "exclude"}
- ]
- , "$1":
- { "type": "foreach"
- , "var": "x"
- , "range":
- {"type": "FIELD", "name": {"type": "var", "name": "fieldname"}}
- , "body":
- { "type": "map_union"
- , "$1":
- { "type": "foreach_map"
- , "range":
- { "type": "DEP_RUNFILES"
- , "dep": {"type": "var", "name": "x"}
- , "transition":
- { "type": "var"
- , "name": "transition"
- , "default": {"type": "empty_map"}
- }
- }
- , "body":
- { "type": "if"
- , "cond":
- { "type": "lookup"
- , "key": {"type": "var", "name": "_"}
- , "map": {"type": "var", "name": "exclude"}
- }
- , "then": {"type": "empty_map"}
- , "else":
- { "type": "singleton_map"
- , "key": {"type": "var", "name": "_"}
- , "value": {"type": "var", "name": "$_"}
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/data/RULES b/data/RULES
deleted file mode 100644
index 49bc1f0..0000000
--- a/data/RULES
+++ /dev/null
@@ -1,138 +0,0 @@
-{ "staged":
- { "doc": ["Stage data to a logical subdirectory."]
- , "target_fields": ["srcs", "deps"]
- , "string_fields": ["stage", "drop"]
- , "field_doc":
- { "srcs": ["The files to be staged"]
- , "stage":
- [ "The logical directory to stage the files to."
- , "Individual directory components are joined with \"/\"."
- ]
- , "deps":
- [ "Targets of with their runfiles should be added as well."
- , "Their staging is not changed."
- ]
- , "drop":
- [ "List of paths to drop from (each of) the \"srcs\" targets"
- , "before joining and staging. In this way, GLOB constructs can"
- , "be used is \"srcs\"."
- ]
- }
- , "artifacts_doc":
- [ "The runfiles and artifacts of the \"srcs\" targets, leaving out"
- , "the ones with logical path in \"drop\", staged to the directory"
- , "specified in \"stage\" together the runfiles of the targets"
- , "specified in the field \"deps\" (in their original location)."
- ]
- , "runfiles_doc": ["Same as artifacts"]
- , "imports":
- { "runfiles": ["./", "..", "field_runfiles"]
- , "artifacts": ["./", "..", "field_artifacts"]
- , "runfiles w/o": "field_runfiles_without"
- , "artifacts w/o": "field_artifacts_without"
- }
- , "expression":
- { "type": "let*"
- , "bindings":
- [ [ "stage"
- , { "type": "join"
- , "separator": "/"
- , "$1": {"type": "FIELD", "name": "stage"}
- }
- ]
- , [ "exclude"
- , { "type": "map_union"
- , "$1":
- { "type": "foreach"
- , "range": {"type": "FIELD", "name": "drop"}
- , "body":
- { "type": "singleton_map"
- , "key": {"type": "var", "name": "_"}
- , "value": true
- }
- }
- }
- ]
- , [ "srcs"
- , { "type": "let*"
- , "bindings": [["fieldname", "srcs"]]
- , "body":
- { "type": "map_union"
- , "$1":
- { "type": "if"
- , "cond": {"type": "var", "name": "exclude"}
- , "then":
- [ {"type": "CALL_EXPRESSION", "name": "runfiles w/o"}
- , {"type": "CALL_EXPRESSION", "name": "artifacts w/o"}
- ]
- , "else":
- [ {"type": "CALL_EXPRESSION", "name": "runfiles"}
- , {"type": "CALL_EXPRESSION", "name": "artifacts"}
- ]
- }
- }
- }
- ]
- , [ "staged"
- , { "type": "to_subdir"
- , "subdir": {"type": "var", "name": "stage"}
- , "$1": {"type": "var", "name": "srcs"}
- }
- ]
- , [ "dep stage"
- , { "type": "let*"
- , "bindings": [["fieldname", "deps"]]
- , "body": {"type": "CALL_EXPRESSION", "name": "runfiles"}
- }
- ]
- , [ "total"
- , { "type": "disjoint_map_union"
- , "msg": "Conflict between staged data and dependencies"
- , "$1":
- [ {"type": "var", "name": "dep stage"}
- , {"type": "var", "name": "staged"}
- ]
- }
- ]
- ]
- , "body":
- { "type": "RESULT"
- , "artifacts": {"type": "var", "name": "total"}
- , "runfiles": {"type": "var", "name": "total"}
- }
- }
- }
-, "overlay":
- { "doc":
- ["Overlay the artifacts of \"deps\" targets in a latest-wins fashion."]
- , "target_fields": ["deps"]
- , "field_doc": {"deps": ["The targets of which to overlay the artifacts"]}
- , "artifacts_doc":
- [ "Artifacts of the targets specified in \"deps\". For conflicting"
- , "logical paths, the artifact is taken from the latest target (in"
- , "the \"deps\" field) that defines that logical path."
- ]
- , "runfiles_doc": ["Same as artifacts"]
- , "expression":
- { "type": "let*"
- , "bindings":
- [ [ "all"
- , { "type": "map_union"
- , "$1":
- { "type": "foreach"
- , "var": "dep"
- , "range": {"type": "FIELD", "name": "deps"}
- , "body":
- {"type": "DEP_ARTIFACTS", "dep": {"type": "var", "name": "dep"}}
- }
- }
- ]
- ]
- , "body":
- { "type": "RESULT"
- , "artifacts": {"type": "var", "name": "all"}
- , "runfiles": {"type": "var", "name": "all"}
- }
- }
- }
-}