diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-16 10:52:49 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-03-16 10:52:49 +0100 |
commit | 3aa6e1dac4bdef2bdc37c97edb37d5f162fbc5c2 (patch) | |
tree | 8bc2a58fe91741b8e057924cfa5c6f24e7108b23 | |
parent | 224a32ec9fed3b12e49976231660ceb282f7a305 (diff) | |
download | justbuild-3aa6e1dac4bdef2bdc37c97edb37d5f162fbc5c2.tar.gz |
Format: Apply compact JSON formatting
70 files changed, 386 insertions, 1085 deletions
diff --git a/etc/defaults/CC/TARGETS.boringssl b/etc/defaults/CC/TARGETS.boringssl index 563e5b1f..f517587b 100644 --- a/etc/defaults/CC/TARGETS.boringssl +++ b/etc/defaults/CC/TARGETS.boringssl @@ -57,9 +57,9 @@ , {"type": "var", "name": "posix_copts"} ] , [ { "type": "==" - , "$1": {"type": "var", "name": "PLATFORM"} - , "$2": "windows_x86_64" - } + , "$1": {"type": "var", "name": "PLATFORM"} + , "$2": "windows_x86_64" + } , ["-DWIN32_LEAN_AND_MEAN", "-DOPENSSL_NO_ASM"] ] ] diff --git a/etc/defaults/CC/TARGETS.nowerror b/etc/defaults/CC/TARGETS.nowerror index ca414ab7..a3a41f9d 100644 --- a/etc/defaults/CC/TARGETS.nowerror +++ b/etc/defaults/CC/TARGETS.nowerror @@ -3,10 +3,7 @@ , "CC": ["clang"] , "CXX": ["clang++"] , "CFLAGS": ["-std=gnu17", "-O2"] - , "CXXFLAGS": - [ "-std=c++20" - , "-O2" - ] + , "CXXFLAGS": ["-std=c++20", "-O2"] , "AR": ["ar"] , "PATH": ["/bin", "/sbin", "/usr/bin", "/usr/sbin"] } diff --git a/etc/import/TARGETS.cares b/etc/import/TARGETS.cares index 5b7df47f..5edc6092 100644 --- a/etc/import/TARGETS.cares +++ b/etc/import/TARGETS.cares @@ -3,11 +3,7 @@ , "name": ["ares"] , "pure C": ["YES"] , "local defines": - [ "_GNU_SOURCE" - , "_HAS_EXCEPTIONS=0" - , "HAVE_CONFIG_H" - , "CARES_STATICLIB" - ] + ["_GNU_SOURCE", "_HAS_EXCEPTIONS=0", "HAVE_CONFIG_H", "CARES_STATICLIB"] , "srcs": [ "ares__close_sockets.c" , "ares__get_hostent.c" diff --git a/etc/import/TARGETS.grpc b/etc/import/TARGETS.grpc index 53ff9cb9..a498d1a3 100644 --- a/etc/import/TARGETS.grpc +++ b/etc/import/TARGETS.grpc @@ -121,12 +121,7 @@ , "name": ["ref_counted"] , "hdrs": ["src/core/lib/gprpp/ref_counted.h"] , "deps": - [ "atomic" - , "debug_location" - , "gpr_base" - , "grpc_trace" - , "ref_counted_ptr" - ] + ["atomic", "debug_location", "gpr_base", "grpc_trace", "ref_counted_ptr"] } , "orphanable": { "type": ["@", "rules", "CC", "library"] @@ -518,8 +513,7 @@ , "pure C": ["YES"] , "srcs": ["src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c"] - , "hdrs": - [["./", "src/core/ext/upb-generated", "udpa_orca_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "udpa_orca_upb_headers"]] , "deps": ["proto_gen_validate_upb", ["@", "upb", ".", "upb"]] } , "grpc_health_upb": @@ -528,8 +522,7 @@ , "pure C": ["YES"] , "srcs": ["src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c"] - , "hdrs": - [["./", "src/core/ext/upb-generated", "grpc_health_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "grpc_health_upb_headers"]] , "deps": [["@", "upb", ".", "upb"]] } , "google_api_upb": @@ -557,8 +550,7 @@ , "pure C": ["yes"] , "srcs": ["src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c"] - , "hdrs": - [["./", "src/core/ext/upb-generated", "grpc_lb_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "grpc_lb_upb_headers"]] , "deps": ["google_api_upb", ["@", "upb", ".", "upb"]] } , "grpc_client_channel": @@ -694,8 +686,7 @@ [ "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc" ] , "private-hdrs": - [ "src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h" - ] + ["src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h"] , "deps": ["grpc_base", "grpc_server_backward_compatibility"] } , "grpc_grpclb_balancer_addresses": @@ -719,8 +710,7 @@ { "type": ["@", "rules", "CC", "library"] , "name": ["grpc_lb_policy_pick_first"] , "srcs": - [ "src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc" - ] + ["src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc"] , "deps": ["grpc_base", "grpc_client_channel", "grpc_lb_subchannel_list"] } , "grpc_lb_policy_round_robin": @@ -766,8 +756,7 @@ { "type": ["@", "rules", "CC", "library"] , "name": ["grpc_resolver_dns_native"] , "srcs": - [ "src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc" - ] + ["src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc"] , "deps": ["grpc_base", "grpc_client_channel", "grpc_resolver_dns_selection"] } , "grpc_resolver_dns_ares": @@ -859,12 +848,7 @@ , "src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.h" , "src/core/tsi/transport_security_grpc.h" ] - , "deps": - [ "gpr" - , "grpc_base" - , "tsi_interface" - , ["@", "libssl", ".", "ssl"] - ] + , "deps": ["gpr", "grpc_base", "tsi_interface", ["@", "libssl", ".", "ssl"]] } , "alts_util": { "type": ["@", "rules", "CC", "library"] @@ -886,10 +870,7 @@ , ["./", "include/grpc", "grpc_secure_public_headers"] ] , "deps": - [ ["./", "src/core/ext/upb-generated", "alts_upb"] - , "gpr" - , "grpc_base" - ] + [["./", "src/core/ext/upb-generated", "alts_upb"], "gpr", "grpc_base"] } , "tsi": { "type": ["@", "rules", "CC", "library"] @@ -973,11 +954,7 @@ , "src/core/ext/filters/client_channel/xds/xds_bootstrap.h" , "src/core/ext/filters/client_channel/xds/xds_client_stats.h" ] - , "deps": - [ ["@", "upb", ".", "upb"] - , ["@", "re2", ".", "re2"] - , "grpc_base" - ] + , "deps": [["@", "upb", ".", "upb"], ["@", "re2", ".", "re2"], "grpc_base"] } , "grpc_xds_client_secure": { "type": ["@", "rules", "CC", "library"] @@ -1042,7 +1019,8 @@ , "grpc_lb_policy_xds_routing": { "type": ["@", "rules", "CC", "library"] , "name": ["grpc_lb_policy_xds_routing"] - , "srcs": ["src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc"] + , "srcs": + ["src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc"] , "deps": [ "grpc_base" , "grpc_client_channel" @@ -1053,7 +1031,8 @@ , "grpc_resolver_xds_secure": { "type": ["@", "rules", "CC", "library"] , "name": ["grpc_resolver_xds_secure"] - , "srcs": ["src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc"] + , "srcs": + ["src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc"] , "private-hdrs": ["src/core/ext/transport/chttp2/alpn/alpn.h"] , "deps": ["grpc_base", "grpc_client_channel", "grpc_xds_client_secure"] } @@ -1136,12 +1115,7 @@ , "src/core/lib/security/util/json_util.h" , ["./", "include/grpc", "grpc_secure_public_headers"] ] - , "deps": - [ "alts_util" - , "grpc_base" - , "grpc_transport_chttp2_alpn" - , "tsi" - ] + , "deps": ["alts_util", "grpc_base", "grpc_transport_chttp2_alpn", "tsi"] } , "grpc_transport_chttp2": { "type": ["@", "rules", "CC", "library"] @@ -1212,11 +1186,7 @@ [ "src/core/ext/transport/chttp2/client/authority.h" , "src/core/ext/transport/chttp2/client/chttp2_connector.h" ] - , "deps": - [ "grpc_base" - , "grpc_client_channel" - , "grpc_transport_chttp2" - ] + , "deps": ["grpc_base", "grpc_client_channel", "grpc_transport_chttp2"] } , "grpc_transport_chttp2_client_insecure": { "type": ["@", "rules", "CC", "library"] @@ -1250,10 +1220,7 @@ , "name": ["grpc_transport_chttp2_server"] , "srcs": ["src/core/ext/transport/chttp2/server/chttp2_server.cc"] , "hdrs": ["src/core/ext/transport/chttp2/server/chttp2_server.h"] - , "deps": - [ "grpc_base" - , "grpc_transport_chttp2" - ] + , "deps": ["grpc_base", "grpc_transport_chttp2"] } , "grpc_transport_chttp2_server_insecure": { "type": ["@", "rules", "CC", "library"] @@ -1263,17 +1230,13 @@ , "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc" ] , "deps": - [ "grpc_base" - , "grpc_transport_chttp2" - , "grpc_transport_chttp2_server" - ] + ["grpc_base", "grpc_transport_chttp2", "grpc_transport_chttp2_server"] } , "grpc_transport_chttp2_server_secure": { "type": ["@", "rules", "CC", "library"] , "name": ["grpc_transport_chttp2_server_secure"] , "srcs": - [ "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc" - ] + ["src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc"] , "deps": [ "grpc_base" , "grpc_secure" @@ -1330,8 +1293,7 @@ , "src/core/ext/upb-generated/envoy/type/semantic_version.upb.c" , "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c" ] - , "hdrs": - [["./", "src/core/ext/upb-generated", "envoy_type_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "envoy_type_upb_headers"]] , "deps": [ "envoy_annotations_upb" , "google_api_upb" @@ -1356,8 +1318,7 @@ , "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c" , "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c" ] - , "hdrs": - [["./", "src/core/ext/upb-generated", "envoy_core_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "envoy_core_upb_headers"]] , "deps": [ "envoy_annotations_upb" , "envoy_type_upb" @@ -1404,8 +1365,7 @@ , "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c" , "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c" ] - , "hdrs": - [["./", "src/core/ext/upb-generated", "envoy_ads_upb_headers"]] + , "hdrs": [["./", "src/core/ext/upb-generated", "envoy_ads_upb_headers"]] , "deps": [ "envoy_annotations_upb" , "envoy_core_upb" @@ -1561,7 +1521,7 @@ { "type": ["@", "rules", "CC", "library"] , "name": ["grpc++_base"] , "srcs": ["grpc++_sources"] - , "hdrs": ["grpc++_public_headers" , "grpc++_headers"] + , "hdrs": ["grpc++_public_headers", "grpc++_headers"] , "deps": [ "grpc" , "grpc++_codegen_base" diff --git a/etc/import/TARGETS.re2 b/etc/import/TARGETS.re2 index 34fd2291..ac486aa1 100644 --- a/etc/import/TARGETS.re2 +++ b/etc/import/TARGETS.re2 @@ -45,11 +45,7 @@ , "util/util.h" ] , "hdrs": - [ "re2/filtered_re2.h" - , "re2/re2.h" - , "re2/set.h" - , "re2/stringpiece.h" - ] + ["re2/filtered_re2.h", "re2/re2.h", "re2/set.h", "re2/stringpiece.h"] , "link external": ["-pthread"] } } diff --git a/etc/import/TARGETS.upb b/etc/import/TARGETS.upb index bbacf8c9..a51c42a6 100644 --- a/etc/import/TARGETS.upb +++ b/etc/import/TARGETS.upb @@ -3,22 +3,14 @@ , "name": ["upb_port"] , "pure C": ["YES"] , "srcs": ["upb/port.c"] - , "hdrs": - [ "upb/port_def.inc" - , "upb/port_undef.inc" - ] + , "hdrs": ["upb/port_def.inc", "upb/port_undef.inc"] } , "upb": { "type": ["@", "rules", "CC", "library"] , "name": ["upb"] , "pure C": ["YES"] , "srcs": - [ "upb/decode.c" - , "upb/encode.c" - , "upb/msg.c" - , "upb/table.c" - , "upb/upb.c" - ] + ["upb/decode.c", "upb/encode.c", "upb/msg.c", "upb/table.c", "upb/upb.c"] , "hdrs": [ "upb/decode.h" , "upb/encode.h" diff --git a/etc/import/absl/base/TARGETS.absl b/etc/import/absl/base/TARGETS.absl index e292e389..a87b05c8 100644 --- a/etc/import/absl/base/TARGETS.absl +++ b/etc/import/absl/base/TARGETS.absl @@ -2,11 +2,7 @@ { "type": ["@", "rules", "CC", "library"] , "name": ["config"] , "stage": ["absl", "base"] - , "hdrs": - [ "config.h" - , "options.h" - , "policy_checks.h" - ] + , "hdrs": ["config.h", "options.h", "policy_checks.h"] } , "core_headers": { "type": ["@", "rules", "CC", "library"] @@ -72,7 +68,7 @@ , "internal/invoke.h" , "internal/scheduling_mode.h" ] - , "deps": ["config" , ["absl/meta", "type_traits"]] + , "deps": ["config", ["absl/meta", "type_traits"]] } , "spinlock_wait": { "type": ["@", "rules", "CC", "library"] diff --git a/etc/import/absl/numeric/TARGETS.absl b/etc/import/absl/numeric/TARGETS.absl index 5947d70f..9d07c5ec 100644 --- a/etc/import/absl/numeric/TARGETS.absl +++ b/etc/import/absl/numeric/TARGETS.absl @@ -4,10 +4,7 @@ , "stage": ["absl", "numeric"] , "srcs": ["int128.cc"] , "hdrs": - [ "int128.h" - , "int128_have_intrinsic.inc" - , "int128_no_intrinsic.inc" - ] + ["int128.h", "int128_have_intrinsic.inc", "int128_no_intrinsic.inc"] , "deps": [["absl/base", "config"], ["absl/base", "core_headers"]] } } diff --git a/etc/import/absl/strings/TARGETS.absl b/etc/import/absl/strings/TARGETS.absl index 979080be..68ffdee1 100644 --- a/etc/import/absl/strings/TARGETS.absl +++ b/etc/import/absl/strings/TARGETS.absl @@ -3,10 +3,7 @@ , "name": ["strings_internal"] , "stage": ["absl", "strings"] , "srcs": - [ "internal/escaping.cc" - , "internal/ostringstream.cc" - , "internal/utf8.cc" - ] + ["internal/escaping.cc", "internal/ostringstream.cc", "internal/utf8.cc"] , "hdrs": [ "internal/char_map.h" , "internal/escaping.h" diff --git a/etc/import/absl/time/TARGETS.absl b/etc/import/absl/time/TARGETS.absl index 198e584e..e52a2eaa 100644 --- a/etc/import/absl/time/TARGETS.absl +++ b/etc/import/absl/time/TARGETS.absl @@ -3,12 +3,7 @@ , "name": ["time"] , "stage": ["absl", "time"] , "srcs": - [ "civil_time.cc" - , "clock.cc" - , "duration.cc" - , "format.cc" - , "time.cc" - ] + ["civil_time.cc", "clock.cc", "duration.cc", "format.cc", "time.cc"] , "hdrs": [ "civil_time.h" , "clock.h" diff --git a/etc/import/absl/time/internal/cctz/TARGETS.absl b/etc/import/absl/time/internal/cctz/TARGETS.absl index 0b898f4a..418bf63f 100644 --- a/etc/import/absl/time/internal/cctz/TARGETS.absl +++ b/etc/import/absl/time/internal/cctz/TARGETS.absl @@ -3,10 +3,7 @@ , "name": ["civil_time"] , "stage": ["absl", "time", "internal", "cctz"] , "srcs": ["src/civil_time_detail.cc"] - , "hdrs": - [ "include/cctz/civil_time.h" - , "include/cctz/civil_time_detail.h" - ] + , "hdrs": ["include/cctz/civil_time.h", "include/cctz/civil_time_detail.h"] , "deps": [["absl/base", "config"]] } , "time_zone": @@ -38,10 +35,7 @@ , "src/time_zone_posix.h" , "src/tzfile.h" ] - , "hdrs": - [ "include/cctz/time_zone.h" - , "include/cctz/zone_info_source.h" - ] + , "hdrs": ["include/cctz/time_zone.h", "include/cctz/zone_info_source.h"] , "deps": ["civil_time", ["absl/base", "config"]] } } diff --git a/etc/import/absl/types/TARGETS.absl b/etc/import/absl/types/TARGETS.absl index 8c777e2c..47185086 100644 --- a/etc/import/absl/types/TARGETS.absl +++ b/etc/import/absl/types/TARGETS.absl @@ -16,10 +16,7 @@ , "stage": ["absl", "types"] , "srcs": ["bad_optional_access.cc"] , "hdrs": ["bad_optional_access.h"] - , "deps": - [ ["absl/base", "config"] - , ["absl/base", "raw_logging_internal"] - ] + , "deps": [["absl/base", "config"], ["absl/base", "raw_logging_internal"]] } , "optional": { "type": ["@", "rules", "CC", "library"] diff --git a/etc/import/deps/pcre/TARGETS.git2 b/etc/import/deps/pcre/TARGETS.git2 index 23086de5..43009f5d 100644 --- a/etc/import/deps/pcre/TARGETS.git2 +++ b/etc/import/deps/pcre/TARGETS.git2 @@ -21,9 +21,7 @@ , "$1": { "type": "++" , "$1": - [ [ "#define HAVE_STDINT_H 1" - , "#define HAVE_INTTYPES_H 1" - ] + [ ["#define HAVE_STDINT_H 1", "#define HAVE_INTTYPES_H 1"] , { "type": "case" , "expr": {"type": "var", "name": "OS"} , "case": {"windows": ["#define HAVE_WINDOWS_H 1"]} @@ -41,14 +39,9 @@ , { "type": "case" , "expr": {"type": "var", "name": "OS"} , "case": {"windows": ["#define HAVE__STRTOI64_H 1"]} - , "default": - [ "#define HAVE_BCOPY_H 1" - , "#define HAVE_STRTOQ_H 1" - ] + , "default": ["#define HAVE_BCOPY_H 1", "#define HAVE_STRTOQ_H 1"] } - , [ "#define HAVE_LONG_LONG 1" - , "#define HAVE_UNSIGNED_LONG_LONG 1" - ] + , ["#define HAVE_LONG_LONG 1", "#define HAVE_UNSIGNED_LONG_LONG 1"] , { "type": "if" , "cond": {"type": "var", "name": "PCRE_STATIC"} , "then": ["#define PCRE_STATIC 1"] @@ -172,9 +165,7 @@ ] } ] - , [ "#define MAX_NAME_SIZE 32" - , "#define MAX_NAME_COUNT 10000" - ] + , ["#define MAX_NAME_SIZE 32", "#define MAX_NAME_COUNT 10000"] ] } } @@ -221,12 +212,6 @@ , "pcre_xclass.c" , "pcreposix.c" ] - , "hdrs": - [ "config.h" - , "pcre.h" - , "pcre_internal.h" - , "ucp.h" - , "pcreposix.h" - ] + , "hdrs": ["config.h", "pcre.h", "pcre_internal.h", "ucp.h", "pcreposix.h"] } } diff --git a/etc/import/include/TARGETS.git2 b/etc/import/include/TARGETS.git2 index 03e54424..ffea642e 100644 --- a/etc/import/include/TARGETS.git2 +++ b/etc/import/include/TARGETS.git2 @@ -21,16 +21,19 @@ , "data": { "type": "let*" , "bindings": - [ [ "THREADSAFE", {"type": "var", "name": "THREADSAFE", "default": true}] + [ ["THREADSAFE", {"type": "var", "name": "THREADSAFE", "default": true}] , [ "ENABLE_TRACE" , {"type": "var", "name": "ENABLE_TRACE", "default": true} ] - , [ "USE_SSH", {"type": "var", "name": "USE_SSH", "default": true}] + , ["USE_SSH", {"type": "var", "name": "USE_SSH", "default": true}] , [ "WINHTTP" , { "type": "var" , "name": "WINHTTP" , "default": - {"type": "==", "$1": {"type": "var", "name": "OS"}, "$2": "windows"} + { "type": "==" + , "$1": {"type": "var", "name": "OS"} + , "$2": "windows" + } } ] , [ "USE_HTTPS" @@ -71,13 +74,13 @@ , "default": {"type": "var", "name": "USE_GSSAPI"} } ] - , [ "USE_SHA1", - { "type": "case*" + , [ "USE_SHA1" + , { "type": "case*" , "expr": {"type": "var", "name": "USE_SHA1", "default": true} , "case": - [ [ true, "CollisionDetection"] - , [ "HTTPS", - { "type": "case*" + [ [true, "CollisionDetection"] + , [ "HTTPS" + , { "type": "case*" , "expr": {"type": "var", "name": "USE_HTTPS"} , "case": [ ["SecureTransport", "CommonCrypto"] @@ -156,11 +159,11 @@ , "expr": {"type": "var", "name": "REGEX_BACKEND"} , "case": [ ["regcomp_l", ["#define GIT_REGEX_REGCOMP_L 1"]] - , ["regcomp", ["#define GIT_REGEX_REGCOMP 1"]] - , ["pcre", ["#define GIT_REGEX_PCRE 1"]] - , ["pcre2", ["#define GIT_REGEX_PCRE2 1"]] - , ["builtin", ["#define GIT_REGEX_BUILTIN 1"]] - , [null, ["#define GIT_REGEX_BUILTIN 1"]] + , ["regcomp", ["#define GIT_REGEX_REGCOMP 1"]] + , ["pcre", ["#define GIT_REGEX_PCRE 1"]] + , ["pcre2", ["#define GIT_REGEX_PCRE2 1"]] + , ["builtin", ["#define GIT_REGEX_BUILTIN 1"]] + , [null, ["#define GIT_REGEX_BUILTIN 1"]] ] , "default": { "type": "fail" @@ -170,9 +173,7 @@ , { "type": "if" , "cond": {"type": "var", "name": "USE_SSH"} , "then": - [ "#define GIT_SSH 1" - , "#define GIT_SSH_MEMORY_CREDENTIALS 1" - ] + ["#define GIT_SSH 1", "#define GIT_SSH_MEMORY_CREDENTIALS 1"] } , { "type": "if" , "cond": {"type": "var", "name": "USE_NTLMCLIENT"} @@ -182,8 +183,8 @@ , "expr": {"type": "var", "name": "USE_GSSAPI"} , "case": [ ["GSS.framework", ["#define GIT_GSSFRAMEWORK 1"]] - , ["gssapi", ["#define GIT_GSSAPI 1"]] - , [false, []] + , ["gssapi", ["#define GIT_GSSAPI 1"]] + , [false, []] ] , "default": { "type": "fail" @@ -199,10 +200,10 @@ , { "type": "case*" , "expr": {"type": "var", "name": "USE_HTTPS"} , "case": - [ [ "SecureTransport", ["#define GIT_SECURE_TRANSPORT 1"]] - , [ "OpenSSL", ["#define GIT_OPENSSL 1"]] - , [ "mbedTLS", ["#define GIT_MBEDTLS 1"]] - , [ "WinHTTP", ["#define GIT_WINHTTP 1"]] + [ ["SecureTransport", ["#define GIT_SECURE_TRANSPORT 1"]] + , ["OpenSSL", ["#define GIT_OPENSSL 1"]] + , ["mbedTLS", ["#define GIT_MBEDTLS 1"]] + , ["WinHTTP", ["#define GIT_WINHTTP 1"]] ] , "default": { "type": "fail" @@ -216,10 +217,10 @@ , "expr": {"type": "var", "name": "USE_SHA1"} , "case": [ ["CollisionDetection", ["#define GIT_SHA1_COLLISIONDETECT 1"]] - , ["Win32", ["#define GIT_SHA1_WIN32 1"]] - , ["CommonCrypto", ["#define GIT_SHA1_COMMON_CRYPTO 1"]] - , ["OpenSSL", ["#define GIT_SHA1_OPENSSL 1"]] - , ["mbedTLS", ["#define GIT_SHA1_MBEDTLS 1"]] + , ["Win32", ["#define GIT_SHA1_WIN32 1"]] + , ["CommonCrypto", ["#define GIT_SHA1_COMMON_CRYPTO 1"]] + , ["OpenSSL", ["#define GIT_SHA1_OPENSSL 1"]] + , ["mbedTLS", ["#define GIT_SHA1_MBEDTLS 1"]] ] } , ["", "#endif", ""] diff --git a/etc/import/include/grpc/TARGETS.grpc b/etc/import/include/grpc/TARGETS.grpc index 8b6bb3e8..250b8c48 100644 --- a/etc/import/include/grpc/TARGETS.grpc +++ b/etc/import/include/grpc/TARGETS.grpc @@ -65,9 +65,7 @@ ] } , "gpr_codegen": - { "type": ["@", "rules", "CC", "library"] - , "hdrs": ["gpr_codegen_headers"] - } + {"type": ["@", "rules", "CC", "library"], "hdrs": ["gpr_codegen_headers"]} , "grpc_codegen_headers": { "type": ["@", "rules", "CC", "header directory"] , "stage": ["grpc"] @@ -85,10 +83,7 @@ } , "grpc_codegen": { "type": ["@", "rules", "CC", "library"] - , "hdrs": - [ "grpc_codegen_headers" - , "gpr_codegen_headers" - ] + , "hdrs": ["grpc_codegen_headers", "gpr_codegen_headers"] } , "grpc_secure_public_headers": { "type": ["@", "rules", "CC", "header directory"] diff --git a/etc/import/src/TARGETS.git2 b/etc/import/src/TARGETS.git2 index 4d6cb05b..b9c30570 100644 --- a/etc/import/src/TARGETS.git2 +++ b/etc/import/src/TARGETS.git2 @@ -168,10 +168,7 @@ , "arguments_config": ["OS", "THREADSAFE"] , "name": ["git2_os_unix"] , "pure C": ["yes"] - , "srcs": - [ "unix/map.c" - , "unix/realpath.c" - ] + , "srcs": ["unix/map.c", "unix/realpath.c"] , "private-hdrs": ["git2_private_headers"] , "link external": { "type": "++" @@ -317,13 +314,13 @@ , "deps": { "type": "let*" , "bindings": - [ [ "USE_SHA1", - { "type": "case*" + [ [ "USE_SHA1" + , { "type": "case*" , "expr": {"type": "var", "name": "USE_SHA1"} , "case": - [ [ true, "CollisionDetection"] - , [ "HTTPS", - { "type": "case*" + [ [true, "CollisionDetection"] + , [ "HTTPS" + , { "type": "case*" , "expr": {"type": "var", "name": "USE_HTTPS"} , "case": [ ["SecureTransport", "CommonCrypto"] @@ -351,9 +348,7 @@ , ["Generic", ["git2_hash_generic"]] ] , "default": - { "type": "fail" - , "msg": "Asked for unknown SHA1 backend in `USE_SHA1`" - } + {"type": "fail", "msg": "Asked for unknown SHA1 backend in `USE_SHA1`"} } } } @@ -367,10 +362,7 @@ , "then": { "type": "case" , "expr": {"type": "var", "name": "REGEX_BACKEND"} - , "case": - { "pcre2": ["-lpcre2-8"] - , "pcre": ["-lpcre"] - } + , "case": {"pcre2": ["-lpcre2-8"], "pcre": ["-lpcre"]} } } , "deps": @@ -380,8 +372,8 @@ { "type": "case*" , "expr": {"type": "var", "name": "REGEX_BACKEND"} , "case": - [ [ "builtin", [["deps/pcre", "git2_pcre"]]] - , [ null, [["deps/pcre", "git2_pcre"]]] + [ ["builtin", [["deps/pcre", "git2_pcre"]]] + , [null, [["deps/pcre", "git2_pcre"]]] ] } , "else": @@ -414,9 +406,7 @@ { "type": "if" , "cond": {"type": "var", "name": "USE_BUNDLED_ZLIB"} , "then": - { "type": "fail" - , "msg": "bundled zlib from deps/zlib not supported yet." - } + {"type": "fail", "msg": "bundled zlib from deps/zlib not supported yet."} , "else": { "type": "if" , "cond": {"type": "var", "name": "USE_SYSTEM_LIBS"} @@ -525,7 +515,10 @@ , { "type": "var" , "name": "WINHTTP" , "default": - {"type": "==", "$1": {"type": "var", "name": "OS"}, "$2": "windows"} + { "type": "==" + , "$1": {"type": "var", "name": "OS"} + , "$2": "windows" + } } ] , [ "USE_HTTPS" diff --git a/etc/import/src/compiler/TARGETS.grpc b/etc/import/src/compiler/TARGETS.grpc index 6c57deb8..95c73085 100644 --- a/etc/import/src/compiler/TARGETS.grpc +++ b/etc/import/src/compiler/TARGETS.grpc @@ -37,9 +37,7 @@ , "schema_interface.h" ] , "deps": - [ [".", "grpc++_config_proto"] - , ["@", "protobuf", ".", "protoc_lib"] - ] + [[".", "grpc++_config_proto"], ["@", "protobuf", ".", "protoc_lib"]] } , "grpc_cpp_plugin": { "type": ["@", "rules", "CC", "binary"] diff --git a/etc/import/src/core/ext/upb-generated/TARGETS.grpc b/etc/import/src/core/ext/upb-generated/TARGETS.grpc index b89db0e7..597dfc6c 100644 --- a/etc/import/src/core/ext/upb-generated/TARGETS.grpc +++ b/etc/import/src/core/ext/upb-generated/TARGETS.grpc @@ -64,9 +64,7 @@ { "type": ["@", "rules", "CC", "header directory"] , "public stage": ["yes"] , "hdrs": - [ "envoy/annotations/deprecation.upb.h" - , "envoy/annotations/resource.upb.h" - ] + ["envoy/annotations/deprecation.upb.h", "envoy/annotations/resource.upb.h"] } , "envoy_type_upb_headers": { "type": ["@", "rules", "CC", "header directory"] diff --git a/etc/import/src/google/protobuf/TARGETS.protobuf b/etc/import/src/google/protobuf/TARGETS.protobuf index 10b0eed6..47eb5062 100644 --- a/etc/import/src/google/protobuf/TARGETS.protobuf +++ b/etc/import/src/google/protobuf/TARGETS.protobuf @@ -233,7 +233,6 @@ , "wrappers.pb.h" ] } - , "protobuf_lite": { "type": ["@", "rules", "CC", "library"] , "name": ["protobuf_lite"] @@ -268,7 +267,6 @@ , "wire_format_lite.cc" ] } - , "protobuf": { "type": ["@", "rules", "CC", "library"] , "name": ["protobuf"] @@ -328,7 +326,6 @@ ] , "deps": ["protobuf_lite", ["@", "zlib", "", "zlib"]] } - , "protoc_lib": { "type": ["@", "rules", "CC", "library"] , "name": ["protoc_lib"] @@ -417,7 +414,6 @@ ] , "deps": ["protobuf"] } - , "protoc": { "type": ["@", "rules", "CC", "binary"] , "name": ["protoc"] @@ -425,7 +421,6 @@ , "deps": ["protoc_lib"] , "link external": ["-pthread"] } - , "well_known_proto_files": { "type": "install" , "deps": @@ -443,9 +438,6 @@ , "wrappers.proto" ] } - , "well_known_protos": - { "type": "install" - , "dirs": [["well_known_proto_files", "google/protobuf"]] - } + {"type": "install", "dirs": [["well_known_proto_files", "google/protobuf"]]} } diff --git a/etc/import/src/include/openssl/TARGETS.boringssl b/etc/import/src/include/openssl/TARGETS.boringssl index f10ebcce..25495bdd 100644 --- a/etc/import/src/include/openssl/TARGETS.boringssl +++ b/etc/import/src/include/openssl/TARGETS.boringssl @@ -80,12 +80,6 @@ { "type": ["@", "rules", "CC", "header directory"] , "stage": ["openssl"] , "public stage": ["yes"] - , "hdrs": - [ "dtls1.h" - , "srtp.h" - , "ssl.h" - , "ssl3.h" - , "tls1.h" - ] + , "hdrs": ["dtls1.h", "srtp.h", "ssl.h", "ssl3.h", "tls1.h"] } } diff --git a/etc/import/third_party/TARGETS.grpc b/etc/import/third_party/TARGETS.grpc index 754568ae..5ebf1703 100644 --- a/etc/import/third_party/TARGETS.grpc +++ b/etc/import/third_party/TARGETS.grpc @@ -1,7 +1,5 @@ { "ares_build_h": - { "type": "install" - , "files": {"ares_build.h": "cares/ares_build.h"} - } + {"type": "install", "files": {"ares_build.h": "cares/ares_build.h"}} , "ares_config_h": { "type": "install" , "arguments_config": ["OS", "ARCH", "TARGET_ARCH"] @@ -109,7 +107,10 @@ ] , "hdrs": ["address_sorting/address_sorting_internal.h"] , "deps": - [ ["./", "address_sorting/include/address_sorting", "address_sorting_headers"] + [ [ "./" + , "address_sorting/include/address_sorting" + , "address_sorting_headers" + ] ] } } diff --git a/rules/CC/RULES b/rules/CC/RULES index 3bbd68c1..4267f963 100644 --- a/rules/CC/RULES +++ b/rules/CC/RULES @@ -167,7 +167,13 @@ { "doc": ["A C++ libaray"] , "target_fields": ["srcs", "hdrs", "private-hdrs", "deps", "proto"] , "string_fields": - ["name", "stage", "pure C", "local defines", "local cflags", "link external"] + [ "name" + , "stage" + , "pure C" + , "local defines" + , "local cflags" + , "link external" + ] , "config_vars": ["CXX", "CC", "CXXFLAGS", "CFLAGS", "ENV", "AR"] , "implicit": {"defaults": ["defaults"]} , "field_doc": diff --git a/src/buildtool/TARGETS b/src/buildtool/TARGETS index 9e26dfee..0967ef42 100644 --- a/src/buildtool/TARGETS +++ b/src/buildtool/TARGETS @@ -1 +1 @@ -{}
\ No newline at end of file +{} diff --git a/src/buildtool/build_engine/analysed_target/TARGETS b/src/buildtool/build_engine/analysed_target/TARGETS index 4884ec46..99668ba4 100644 --- a/src/buildtool/build_engine/analysed_target/TARGETS +++ b/src/buildtool/build_engine/analysed_target/TARGETS @@ -9,4 +9,4 @@ ] , "stage": ["src", "buildtool", "build_engine", "analysed_target"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/build_engine/base_maps/TARGETS b/src/buildtool/build_engine/base_maps/TARGETS index 7ba580ca..2c1e6eb3 100644 --- a/src/buildtool/build_engine/base_maps/TARGETS +++ b/src/buildtool/build_engine/base_maps/TARGETS @@ -159,4 +159,4 @@ ] , "stage": ["src", "buildtool", "build_engine", "base_maps"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/build_engine/expression/TARGETS b/src/buildtool/build_engine/expression/TARGETS index 4f719185..2a72ed8c 100644 --- a/src/buildtool/build_engine/expression/TARGETS +++ b/src/buildtool/build_engine/expression/TARGETS @@ -43,4 +43,4 @@ ] , "stage": ["src", "buildtool", "build_engine", "expression"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/build_engine/target_map/TARGETS b/src/buildtool/build_engine/target_map/TARGETS index 71c9dd78..1426b85f 100644 --- a/src/buildtool/build_engine/target_map/TARGETS +++ b/src/buildtool/build_engine/target_map/TARGETS @@ -47,4 +47,4 @@ ] , "stage": ["src", "buildtool", "build_engine", "target_map"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/common/TARGETS b/src/buildtool/common/TARGETS index 642ff0ff..49eb9b5c 100644 --- a/src/buildtool/common/TARGETS +++ b/src/buildtool/common/TARGETS @@ -98,4 +98,4 @@ ] , "stage": ["src", "buildtool", "common"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/crypto/TARGETS b/src/buildtool/crypto/TARGETS index d68758ed..57bc3608 100644 --- a/src/buildtool/crypto/TARGETS +++ b/src/buildtool/crypto/TARGETS @@ -28,4 +28,4 @@ , "deps": ["hash_impl"] , "stage": ["src", "buildtool", "crypto"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_api/TARGETS b/src/buildtool/execution_api/TARGETS index 9e26dfee..0967ef42 100644 --- a/src/buildtool/execution_api/TARGETS +++ b/src/buildtool/execution_api/TARGETS @@ -1 +1 @@ -{}
\ No newline at end of file +{} diff --git a/src/buildtool/execution_api/bazel_msg/TARGETS b/src/buildtool/execution_api/bazel_msg/TARGETS index 19fe1277..6746f587 100644 --- a/src/buildtool/execution_api/bazel_msg/TARGETS +++ b/src/buildtool/execution_api/bazel_msg/TARGETS @@ -28,4 +28,4 @@ , "proto": [["@", "bazel_remote_apis", "", "remote_execution_proto"]] , "stage": ["src", "buildtool", "execution_api", "bazel_msg"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS index aa3ad0bd..6994e247 100644 --- a/src/buildtool/execution_api/common/TARGETS +++ b/src/buildtool/execution_api/common/TARGETS @@ -19,4 +19,4 @@ ] , "stage": ["src", "buildtool", "execution_api", "common"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_api/local/TARGETS b/src/buildtool/execution_api/local/TARGETS index 398f00e4..b6d265a6 100644 --- a/src/buildtool/execution_api/local/TARGETS +++ b/src/buildtool/execution_api/local/TARGETS @@ -33,4 +33,4 @@ ] , "stage": ["src", "buildtool", "execution_api", "local"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_api/remote/TARGETS b/src/buildtool/execution_api/remote/TARGETS index 6f9fc004..b05404ed 100644 --- a/src/buildtool/execution_api/remote/TARGETS +++ b/src/buildtool/execution_api/remote/TARGETS @@ -56,4 +56,4 @@ [["src/buildtool/logging", "logging"], ["@", "gsl-lite", "", "gsl-lite"]] , "stage": ["src", "buildtool", "execution_api", "remote"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_engine/TARGETS b/src/buildtool/execution_engine/TARGETS index 9e26dfee..0967ef42 100644 --- a/src/buildtool/execution_engine/TARGETS +++ b/src/buildtool/execution_engine/TARGETS @@ -1 +1 @@ -{}
\ No newline at end of file +{} diff --git a/src/buildtool/execution_engine/dag/TARGETS b/src/buildtool/execution_engine/dag/TARGETS index 3c46f75f..50b0f813 100644 --- a/src/buildtool/execution_engine/dag/TARGETS +++ b/src/buildtool/execution_engine/dag/TARGETS @@ -14,4 +14,4 @@ ] , "stage": ["src", "buildtool", "execution_engine", "dag"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_engine/executor/TARGETS b/src/buildtool/execution_engine/executor/TARGETS index de0fd8f3..6354665a 100644 --- a/src/buildtool/execution_engine/executor/TARGETS +++ b/src/buildtool/execution_engine/executor/TARGETS @@ -13,4 +13,4 @@ ] , "stage": ["src", "buildtool", "execution_engine", "executor"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/execution_engine/traverser/TARGETS b/src/buildtool/execution_engine/traverser/TARGETS index eb306b6e..a3cbac05 100644 --- a/src/buildtool/execution_engine/traverser/TARGETS +++ b/src/buildtool/execution_engine/traverser/TARGETS @@ -11,4 +11,4 @@ ] , "stage": ["src", "buildtool", "execution_engine", "traverser"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/graph_traverser/TARGETS b/src/buildtool/graph_traverser/TARGETS index ab13a2bc..6775ffd0 100644 --- a/src/buildtool/graph_traverser/TARGETS +++ b/src/buildtool/graph_traverser/TARGETS @@ -19,4 +19,4 @@ ] , "stage": ["src", "buildtool", "graph_traverser"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/logging/TARGETS b/src/buildtool/logging/TARGETS index 2a02cd93..61161797 100644 --- a/src/buildtool/logging/TARGETS +++ b/src/buildtool/logging/TARGETS @@ -17,4 +17,4 @@ , "deps": ["log_level", ["@", "fmt", "", "fmt"]] , "stage": ["src", "buildtool", "logging"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/main/TARGETS b/src/buildtool/main/TARGETS index ad4ab98a..6f9e2b46 100644 --- a/src/buildtool/main/TARGETS +++ b/src/buildtool/main/TARGETS @@ -18,4 +18,4 @@ ] , "stage": ["src", "buildtool", "main"] } -}
\ No newline at end of file +} diff --git a/src/buildtool/multithreading/TARGETS b/src/buildtool/multithreading/TARGETS index f14d42bb..5d6d773a 100644 --- a/src/buildtool/multithreading/TARGETS +++ b/src/buildtool/multithreading/TARGETS @@ -51,4 +51,4 @@ ] , "stage": ["src", "buildtool", "multithreading"] } -}
\ No newline at end of file +} diff --git a/src/utils/TARGETS b/src/utils/TARGETS index 9e26dfee..0967ef42 100644 --- a/src/utils/TARGETS +++ b/src/utils/TARGETS @@ -1 +1 @@ -{}
\ No newline at end of file +{} diff --git a/src/utils/cpp/TARGETS b/src/utils/cpp/TARGETS index 6b4347a2..35a53a68 100644 --- a/src/utils/cpp/TARGETS +++ b/src/utils/cpp/TARGETS @@ -37,4 +37,4 @@ , "hdrs": ["hex_string.hpp"] , "stage": ["src", "utils", "cpp"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/build_engine/base_maps/data_expr/EXPRESSIONS b/test/buildtool/build_engine/base_maps/data_expr/EXPRESSIONS index 06ac3800..9a4eb835 100644 --- a/test/buildtool/build_engine/base_maps/data_expr/EXPRESSIONS +++ b/test/buildtool/build_engine/base_maps/data_expr/EXPRESSIONS @@ -1,66 +1,23 @@ -{ - "test_expression_literal": { - "expression": "foo" - }, - "test_read_vars": { - "vars": ["FOO"], - "expression": { - "type": "var", - "name": "FOO" - } - }, - "test_call_import": { - "vars": ["FOO"], - "imports": { - "read_foo": [ - "readers", - "real_foo_reader" - ] - }, - "expression": { - "type": "CALL_EXPRESSION", - "name": "read_foo" - } - }, - "test_overwrite_import": { - "vars": ["FOO"], - "imports": { - "read_foo": [ - "readers", - "proxy_foo_reader" - ] - }, - "expression": { - "type": "CALL_EXPRESSION", - "name": "read_foo" - } - }, - "test_missing_vars": { - "expression": { - "type": "var", - "name": "FOO" - } - }, - "test_missing_imports": { - "expression": { - "type": "CALL_EXPRESSION", - "name": "read_foo" - } - }, - "test_malformed_function": "not_an_object", - "test_malformed_expression": { - "missing_expression": {} - }, - "test_malformed_vars": { - "vars": "not_a_list", - "expression": { - "type": "empty_map" - } - }, - "test_malformed_imports": { - "imports": "not_an_object", - "expression": { - "type": "empty_map" - } +{ "test_expression_literal": {"expression": "foo"} +, "test_read_vars": + {"vars": ["FOO"], "expression": {"type": "var", "name": "FOO"}} +, "test_call_import": + { "vars": ["FOO"] + , "imports": {"read_foo": ["readers", "real_foo_reader"]} + , "expression": {"type": "CALL_EXPRESSION", "name": "read_foo"} } +, "test_overwrite_import": + { "vars": ["FOO"] + , "imports": {"read_foo": ["readers", "proxy_foo_reader"]} + , "expression": {"type": "CALL_EXPRESSION", "name": "read_foo"} + } +, "test_missing_vars": {"expression": {"type": "var", "name": "FOO"}} +, "test_missing_imports": + {"expression": {"type": "CALL_EXPRESSION", "name": "read_foo"}} +, "test_malformed_function": "not_an_object" +, "test_malformed_expression": {"missing_expression": {}} +, "test_malformed_vars": + {"vars": "not_a_list", "expression": {"type": "empty_map"}} +, "test_malformed_imports": + {"imports": "not_an_object", "expression": {"type": "empty_map"}} } diff --git a/test/buildtool/build_engine/base_maps/data_expr/readers/EXPRESSIONS b/test/buildtool/build_engine/base_maps/data_expr/readers/EXPRESSIONS index 9ad388ed..ccd6c3e6 100644 --- a/test/buildtool/build_engine/base_maps/data_expr/readers/EXPRESSIONS +++ b/test/buildtool/build_engine/base_maps/data_expr/readers/EXPRESSIONS @@ -1,23 +1,8 @@ -{ - "proxy_foo_reader": { - "vars": [ - "FOO" - ], - "imports": { - "read_foo": "real_foo_reader" - }, - "expression": { - "type": "CALL_EXPRESSION", - "name": "read_foo" - } - }, - "real_foo_reader": { - "vars": [ - "FOO" - ], - "expression": { - "type": "var", - "name": "FOO" - } +{ "proxy_foo_reader": + { "vars": ["FOO"] + , "imports": {"read_foo": "real_foo_reader"} + , "expression": {"type": "CALL_EXPRESSION", "name": "read_foo"} } +, "real_foo_reader": + {"vars": ["FOO"], "expression": {"type": "var", "name": "FOO"}} } diff --git a/test/buildtool/build_engine/base_maps/data_rule/RULES b/test/buildtool/build_engine/base_maps/data_rule/RULES index ab25016f..ac6c540a 100644 --- a/test/buildtool/build_engine/base_maps/data_rule/RULES +++ b/test/buildtool/build_engine/base_maps/data_rule/RULES @@ -1,232 +1,93 @@ -{ - "test_empty_rule": { - "expression": { - "type": "RESULT" - } - }, - "test_rule_fields": { - "string_fields": ["foo"], - "target_fields": ["bar"], - "config_fields": ["baz"], - "expression": { - "type": "RESULT" - } - }, - "test_config_transitions_target_via_field": { - "target_fields": ["target"], - "config_transitions": { - "target": [{ - "type": "empty_map" - }] - }, - "expression": { - "type": "RESULT" - } - }, - "test_config_transitions_target_via_implicit": { - "implicit": { - "target": [ - ["module", "name"] - ] - }, - "config_transitions": { - "target": [{ - "type": "empty_map" - }] - }, - "expression": { - "type": "RESULT" - } - }, - "test_config_transitions_canonicalness": { - "target_fields": ["foo", "bar"], - "string_fields": ["quux", "corge"], - "config_fields": ["grault", "garply"], - "implicit": { - "baz": [ - ["module", "name"] - ], - "qux": [ - ["module", "name"] - ] - }, - "config_transitions": { - "bar": [{ - "type": "singleton_map", - "key": "exists", - "value": true - }], - "qux": [{ - "type": "singleton_map", - "key": "defined", - "value": true - }] - }, - "expression": { - "type": "RESULT" - } - }, - "test_call_import": { - "config_vars": ["FOO"], - "imports": { - "compose_foo": [ - "composers", - "foo_composer" - ] - }, - "expression": { - "type": "CALL_EXPRESSION", - "name": "compose_foo" - } - }, - "test_string_kw_conflict": { - "string_fields": ["foo", "type", "bar"], - "expression": { - "type": "RESULT" - } - }, - "test_target_kw_conflict": { - "target_fields": ["foo", "arguments_config", "bar"], - "expression": { - "type": "RESULT" - } - }, - "test_config_kw_conflict": { - "config_fields": ["foo", "type", "bar"], - "expression": { - "type": "RESULT" - } - }, - "test_implicit_kw_conflict": { - "implicit": { - "foo": [], - "arguments_config": [], - "bar": [] - }, - "expression": { - "type": "RESULT" - } - }, - "test_string_target_conflict": { - "string_fields": ["foo", "bar"], - "target_fields": ["bar", "baz"], - "expression": { - "type": "RESULT" - } - }, - "test_target_config_conflict": { - "target_fields": ["foo", "bar"], - "config_fields": ["bar", "baz"], - "expression": { - "type": "RESULT" - } - }, - "test_config_implicit_conflict": { - "config_fields": ["foo", "bar"], - "implicit": { - "bar": [ - ["module", "name"] - ], - "baz": [ - ["module", "name"] - ] - }, - "expression": { - "type": "RESULT" - } - }, - "test_unknown_config_transitions_target": { - "config_transitions": { - "missing": [{ - "type": "empty_map" - }] - }, - "expression": { - "type": "RESULT" - } - }, - "test_missing_config_vars": { - "imports": { - "compose_foo": [ - "composers", - "foo_composer" - ] - }, - "expression": { - "type": "CALL_EXPRESSION", - "name": "compose_foo" - } - }, - "test_missing_imports": { - "expression": { - "type": "CALL_EXPRESSION", - "name": "compose_foo" - } - }, - "test_malformed_rule": "not_an_object", - "test_malformed_rule_expression": { - "missing_expression": { - "type": "RESULT" - } - }, - "test_malformed_target_fields": { - "target_fields": "not_a_list", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_string_fields": { - "string_fields": "not_a_list", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_config_fields": { - "config_fields": "not_a_list", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_implicit": { - "implicit": "not_an_object", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_implicit_entry": { - "implicit": { - "target": "not_a_list" - }, - "expression": { - "type": "RESULT" - } - }, - "test_malformed_implicit_entity_name": { - "implicit": { - "target": [ - ["module_without_name"] - ] - }, - "expression": { - "type": "RESULT" - } - }, - "test_malformed_config_vars": { - "config_vars": "not_a_list", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_config_transitions": { - "config_transitions": "not_an_object", - "expression": { - "type": "RESULT" - } - }, - "test_malformed_imports": { - "imports": "not_an_object", - "expression": { - "type": "RESULT" - } +{ "test_empty_rule": {"expression": {"type": "RESULT"}} +, "test_rule_fields": + { "string_fields": ["foo"] + , "target_fields": ["bar"] + , "config_fields": ["baz"] + , "expression": {"type": "RESULT"} + } +, "test_config_transitions_target_via_field": + { "target_fields": ["target"] + , "config_transitions": {"target": [{"type": "empty_map"}]} + , "expression": {"type": "RESULT"} + } +, "test_config_transitions_target_via_implicit": + { "implicit": {"target": [["module", "name"]]} + , "config_transitions": {"target": [{"type": "empty_map"}]} + , "expression": {"type": "RESULT"} + } +, "test_config_transitions_canonicalness": + { "target_fields": ["foo", "bar"] + , "string_fields": ["quux", "corge"] + , "config_fields": ["grault", "garply"] + , "implicit": {"baz": [["module", "name"]], "qux": [["module", "name"]]} + , "config_transitions": + { "bar": [{"type": "singleton_map", "key": "exists", "value": true}] + , "qux": [{"type": "singleton_map", "key": "defined", "value": true}] + } + , "expression": {"type": "RESULT"} + } +, "test_call_import": + { "config_vars": ["FOO"] + , "imports": {"compose_foo": ["composers", "foo_composer"]} + , "expression": {"type": "CALL_EXPRESSION", "name": "compose_foo"} + } +, "test_string_kw_conflict": + {"string_fields": ["foo", "type", "bar"], "expression": {"type": "RESULT"}} +, "test_target_kw_conflict": + { "target_fields": ["foo", "arguments_config", "bar"] + , "expression": {"type": "RESULT"} + } +, "test_config_kw_conflict": + {"config_fields": ["foo", "type", "bar"], "expression": {"type": "RESULT"}} +, "test_implicit_kw_conflict": + { "implicit": {"foo": [], "arguments_config": [], "bar": []} + , "expression": {"type": "RESULT"} + } +, "test_string_target_conflict": + { "string_fields": ["foo", "bar"] + , "target_fields": ["bar", "baz"] + , "expression": {"type": "RESULT"} + } +, "test_target_config_conflict": + { "target_fields": ["foo", "bar"] + , "config_fields": ["bar", "baz"] + , "expression": {"type": "RESULT"} + } +, "test_config_implicit_conflict": + { "config_fields": ["foo", "bar"] + , "implicit": {"bar": [["module", "name"]], "baz": [["module", "name"]]} + , "expression": {"type": "RESULT"} + } +, "test_unknown_config_transitions_target": + { "config_transitions": {"missing": [{"type": "empty_map"}]} + , "expression": {"type": "RESULT"} + } +, "test_missing_config_vars": + { "imports": {"compose_foo": ["composers", "foo_composer"]} + , "expression": {"type": "CALL_EXPRESSION", "name": "compose_foo"} + } +, "test_missing_imports": + {"expression": {"type": "CALL_EXPRESSION", "name": "compose_foo"}} +, "test_malformed_rule": "not_an_object" +, "test_malformed_rule_expression": {"missing_expression": {"type": "RESULT"}} +, "test_malformed_target_fields": + {"target_fields": "not_a_list", "expression": {"type": "RESULT"}} +, "test_malformed_string_fields": + {"string_fields": "not_a_list", "expression": {"type": "RESULT"}} +, "test_malformed_config_fields": + {"config_fields": "not_a_list", "expression": {"type": "RESULT"}} +, "test_malformed_implicit": + {"implicit": "not_an_object", "expression": {"type": "RESULT"}} +, "test_malformed_implicit_entry": + {"implicit": {"target": "not_a_list"}, "expression": {"type": "RESULT"}} +, "test_malformed_implicit_entity_name": + { "implicit": {"target": [["module_without_name"]]} + , "expression": {"type": "RESULT"} } +, "test_malformed_config_vars": + {"config_vars": "not_a_list", "expression": {"type": "RESULT"}} +, "test_malformed_config_transitions": + {"config_transitions": "not_an_object", "expression": {"type": "RESULT"}} +, "test_malformed_imports": + {"imports": "not_an_object", "expression": {"type": "RESULT"}} } diff --git a/test/buildtool/build_engine/base_maps/data_rule/composers/EXPRESSIONS b/test/buildtool/build_engine/base_maps/data_rule/composers/EXPRESSIONS index b5ca8cb8..e52ca416 100644 --- a/test/buildtool/build_engine/base_maps/data_rule/composers/EXPRESSIONS +++ b/test/buildtool/build_engine/base_maps/data_rule/composers/EXPRESSIONS @@ -1,25 +1,15 @@ -{ - "foo_composer": { - "vars": [ - "FOO" - ], - "expression": { - "type": "map_union", - "$1": [{ - "type": "singleton_map", - "key": "type", - "value": "RESULT" - }, - { - "type": "singleton_map", - "key": "artifacts", - "value": { - "type": "singleton_map", - "key": "foo", - "value": { - "type": "var", - "name": "FOO" - } +{ "foo_composer": + { "vars": ["FOO"] + , "expression": + { "type": "map_union" + , "$1": + [ {"type": "singleton_map", "key": "type", "value": "RESULT"} + , { "type": "singleton_map" + , "key": "artifacts" + , "value": + { "type": "singleton_map" + , "key": "foo" + , "value": {"type": "var", "name": "FOO"} } } ] diff --git a/test/buildtool/build_engine/expression/TARGETS b/test/buildtool/build_engine/expression/TARGETS index 83c560fa..1796ca3a 100644 --- a/test/buildtool/build_engine/expression/TARGETS +++ b/test/buildtool/build_engine/expression/TARGETS @@ -39,4 +39,4 @@ , "tainted": ["test"] , "deps": ["configuration", "expression", "linked_map"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/build_engine/target_map/TARGETS b/test/buildtool/build_engine/target_map/TARGETS index 62cfae4c..36799630 100644 --- a/test/buildtool/build_engine/target_map/TARGETS +++ b/test/buildtool/build_engine/target_map/TARGETS @@ -69,4 +69,4 @@ , "tainted": ["test"] , "deps": ["result_map", "target_map"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/build_engine/target_map/data_rules/result/RULES b/test/buildtool/build_engine/target_map/data_rules/result/RULES index 6d9affe5..3679d416 100644 --- a/test/buildtool/build_engine/target_map/data_rules/result/RULES +++ b/test/buildtool/build_engine/target_map/data_rules/result/RULES @@ -1,151 +1,85 @@ { "wrong RESULT": { "string_fields": - [ "runfiles" - , "runfiles_entry" - , "artifacts" - , "artifacts_entry" - , "provides" - ] + ["runfiles", "runfiles_entry", "artifacts", "artifacts_entry", "provides"] , "expression": { "type": "let*" - , "bindings": - [ [ "artifact" - , { "type": "BLOB" - } - ] - ] + , "bindings": [["artifact", {"type": "BLOB"}]] , "body": { "type": "RESULT" , "artifacts": { "type": "if" - , "cond": - { "type": "FIELD" - , "name": "artifacts" - } + , "cond": {"type": "FIELD", "name": "artifacts"} , "then": [ { "type": "join" - , "$1": - [ "artifacts" - , "not" - , "a" - , "map" - ] + , "$1": ["artifacts", "not", "a", "map"] , "separator": "-" } ] , "else": { "type": "if" - , "cond": - { "type": "FIELD" - , "name": "artifacts_entry" - } + , "cond": {"type": "FIELD", "name": "artifacts_entry"} , "then": { "type": "singleton_map" , "key": { "type": "join" - , "$1": - [ "bad" - , "artifact" - , "path" - ] + , "$1": ["bad", "artifact", "path"] , "separator": "-" } , "value": { "type": "join" - , "$1": - [ "bad" - , "artifact" - , "entry" - ] + , "$1": ["bad", "artifact", "entry"] , "separator": "-" } } , "else": { "type": "singleton_map" , "key": "OK" - , "value": - { "type": "var" - , "name": "artifact" - } + , "value": {"type": "var", "name": "artifact"} } } } , "runfiles": { "type": "if" - , "cond": - { "type": "FIELD" - , "name": "runfiles" - } + , "cond": {"type": "FIELD", "name": "runfiles"} , "then": [ { "type": "join" - , "$1": - [ "runfiles" - , "not" - , "a" - , "map" - ] + , "$1": ["runfiles", "not", "a", "map"] , "separator": "-" } ] , "else": { "type": "if" - , "cond": - { "type": "FIELD" - , "name": "runfiles_entry" - } + , "cond": {"type": "FIELD", "name": "runfiles_entry"} , "then": { "type": "singleton_map" , "key": { "type": "join" - , "$1": - [ "bad" - , "runfiles" - , "path" - ] + , "$1": ["bad", "runfiles", "path"] , "separator": "-" } , "value": { "type": "join" - , "$1": - [ "bad" - , "runfiles" - , "entry" - ] + , "$1": ["bad", "runfiles", "entry"] , "separator": "-" } } , "else": { "type": "singleton_map" , "key": "OK" - , "value": - { "type": "var" - , "name": "artifact" - } + , "value": {"type": "var", "name": "artifact"} } } } , "provides": { "type": "if" - , "cond": - { "type": "FIELD" - , "name": "provides" - } + , "cond": {"type": "FIELD", "name": "provides"} , "then": [ { "type": "join" - , "$1": - [ "provides" - , "not" - , "a" - , "map" - ] + , "$1": ["provides", "not", "a", "map"] , "separator": "-" } ] - , "else": - { "type": "singleton_map" - , "key": "OK" - , "value": "OK value" - } + , "else": {"type": "singleton_map", "key": "OK", "value": "OK value"} } } } diff --git a/test/buildtool/build_engine/target_map/data_rules/simple_rules/RULES b/test/buildtool/build_engine/target_map/data_rules/simple_rules/RULES index 749010ed..7533333b 100644 --- a/test/buildtool/build_engine/target_map/data_rules/simple_rules/RULES +++ b/test/buildtool/build_engine/target_map/data_rules/simple_rules/RULES @@ -1,47 +1,28 @@ { "just provide": { "expression": { "type": "RESULT" - , "provides": - { "type": "singleton_map" - , "key": "foo" - , "value": "bar" - } + , "provides": {"type": "singleton_map", "key": "foo", "value": "bar"} } } , "provide variable FOO": - { "config_vars": - [ "FOO" - ] + { "config_vars": ["FOO"] , "expression": { "type": "RESULT" , "provides": { "type": "singleton_map" , "key": "foo" - , "value": - { "type": "var" - , "name": "FOO" - } + , "value": {"type": "var", "name": "FOO"} } } } , "transition FOO": - { "config_fields": - [ "value" - ] - , "target_fields": - [ "deps" - ] + { "config_fields": ["value"] + , "target_fields": ["deps"] , "config_transitions": { "deps": [ { "type": "singleton_map" , "key": "FOO" - , "value": - { "type": "join" - , "$1": - { "type": "FIELD" - , "name": "value" - } - } + , "value": {"type": "join", "$1": {"type": "FIELD", "name": "value"}} } ] } @@ -53,26 +34,15 @@ , "value": { "type": "foreach" , "var": "x" - , "range": - { "type": "FIELD" - , "name": "deps" - } + , "range": {"type": "FIELD", "name": "deps"} , "body": { "type": "DEP_PROVIDES" - , "dep": - { "type": "var" - , "name": "x" - } + , "dep": {"type": "var", "name": "x"} , "transition": { "type": "singleton_map" , "key": "FOO" , "value": - { "type": "join" - , "$1": - { "type": "FIELD" - , "name": "value" - } - } + {"type": "join", "$1": {"type": "FIELD", "name": "value"}} } , "provider": "foo" } @@ -81,9 +51,7 @@ } } , "collect deps": - { "target_fields": - [ "deps" - ] + { "target_fields": ["deps"] , "expression": { "type": "RESULT" , "artifacts": @@ -91,25 +59,15 @@ , "$1": { "type": "foreach" , "var": "x" - , "range": - { "type": "FIELD" - , "name": "deps" - } + , "range": {"type": "FIELD", "name": "deps"} , "body": - { "type": "DEP_ARTIFACTS" - , "dep": - { "type": "var" - , "name": "x" - } - } + {"type": "DEP_ARTIFACTS", "dep": {"type": "var", "name": "x"}} } } } } , "collect deps as runfiles": - { "target_fields": - [ "deps" - ] + { "target_fields": ["deps"] , "expression": { "type": "RESULT" , "runfiles": @@ -117,59 +75,30 @@ , "$1": { "type": "foreach" , "var": "x" - , "range": - { "type": "FIELD" - , "name": "deps" - } + , "range": {"type": "FIELD", "name": "deps"} , "body": - { "type": "DEP_ARTIFACTS" - , "dep": - { "type": "var" - , "name": "x" - } - } + {"type": "DEP_ARTIFACTS", "dep": {"type": "var", "name": "x"}} } } } } , "text file": - { "string_fields": - [ "name" - , "content" - ] - , "target_fields": - [ "analyze" - ] + { "string_fields": ["name", "content"] + , "target_fields": ["analyze"] , "expression": { "type": "RESULT" , "artifacts": { "type": "singleton_map" - , "key": - { "type": "join" - , "$1": - { "type": "FIELD" - , "name": "name" - } - } + , "key": {"type": "join", "$1": {"type": "FIELD", "name": "name"}} , "value": { "type": "BLOB" - , "data": - { "type": "join" - , "$1": - { "type": "FIELD" - , "name": "content" - } - } + , "data": {"type": "join", "$1": {"type": "FIELD", "name": "content"}} } } } } , "implicit file": - { "implicit": - { "script": - [ "implicit_script.sh" - ] - } + { "implicit": {"script": ["implicit_script.sh"]} , "expression": { "type": "RESULT" , "artifacts": @@ -177,25 +106,15 @@ , "$1": { "type": "foreach" , "var": "x" - , "range": - { "type": "FIELD" - , "name": "script" - } + , "range": {"type": "FIELD", "name": "script"} , "body": - { "type": "DEP_ARTIFACTS" - , "dep": - { "type": "var" - , "name": "x" - } - } + {"type": "DEP_ARTIFACTS", "dep": {"type": "var", "name": "x"}} } } } } , "upper case": - { "target_fields": - [ "srcs" - ] + { "target_fields": ["srcs"] , "expression": { "type": "RESULT" , "artifacts": @@ -203,10 +122,7 @@ , "$1": { "type": "foreach" , "var": "input" - , "range": - { "type": "FIELD" - , "name": "srcs" - } + , "range": {"type": "FIELD", "name": "srcs"} , "body": { "type": "disjoint_map_union" , "$1": @@ -214,28 +130,19 @@ , "bindings": [ [ "input_artifacts" , { "type": "DEP_ARTIFACTS" - , "dep": - { "type": "var" - , "name": "input" - } + , "dep": {"type": "var", "name": "input"} } ] , [ "names" , { "type": "keys" - , "$1": - { "type": "var" - , "name": "input_artifacts" - } + , "$1": {"type": "var", "name": "input_artifacts"} } ] ] , "body": { "type": "foreach" , "var": "x" - , "range": - { "type": "var" - , "name": "names" - } + , "range": {"type": "var", "name": "names"} , "body": { "type": "let*" , "bindings": @@ -246,39 +153,21 @@ , "key": "in" , "value": { "type": "lookup" - , "map": - { "type": "var" - , "name": "input_artifacts" - } - , "key": - { "type": "var" - , "name": "x" - } + , "map": {"type": "var", "name": "input_artifacts"} + , "key": {"type": "var", "name": "x"} } } - , "outs": - [ "out" - ] - , "cmd": - [ "/bin/sh" - , "-c" - , "tr 'a-z' 'A-Z' < in > out" - ] + , "outs": ["out"] + , "cmd": ["/bin/sh", "-c", "tr 'a-z' 'A-Z' < in > out"] } ] ] , "body": { "type": "singleton_map" - , "key": - { "type": "var" - , "name": "x" - } + , "key": {"type": "var", "name": "x"} , "value": { "type": "lookup" - , "map": - { "type": "var" - , "name": "upper" - } + , "map": {"type": "var", "name": "upper"} , "key": "out" } } diff --git a/test/buildtool/build_engine/target_map/data_rules/tree/RULES b/test/buildtool/build_engine/target_map/data_rules/tree/RULES index 66fedde9..3dcf2870 100644 --- a/test/buildtool/build_engine/target_map/data_rules/tree/RULES +++ b/test/buildtool/build_engine/target_map/data_rules/tree/RULES @@ -1,8 +1,5 @@ { "ls -R": - { "target_fields": - [ "tree" - , "direct" - ] + { "target_fields": ["tree", "direct"] , "expression": { "type": "let*" , "bindings": @@ -13,17 +10,9 @@ , "$1": { "type": "foreach" , "var": "dep" - , "range": - { "type": "FIELD" - , "name": "tree" - } + , "range": {"type": "FIELD", "name": "tree"} , "body": - { "type": "DEP_RUNFILES" - , "dep": - { "type": "var" - , "name": "dep" - } - } + {"type": "DEP_RUNFILES", "dep": {"type": "var", "name": "dep"}} } } } @@ -33,17 +22,9 @@ , "$1": { "type": "foreach" , "var": "dep" - , "range": - { "type": "FIELD" - , "name": "direct" - } + , "range": {"type": "FIELD", "name": "direct"} , "body": - { "type": "DEP_RUNFILES" - , "dep": - { "type": "var" - , "name": "dep" - } - } + {"type": "DEP_RUNFILES", "dep": {"type": "var", "name": "dep"}} } } ] @@ -52,14 +33,9 @@ , "$1": [ { "type": "singleton_map" , "key": "tree" - , "value": - { "type": "var" - , "name": "tree" - } - } - , { "type": "var" - , "name": "direct" + , "value": {"type": "var", "name": "tree"} } + , {"type": "var", "name": "direct"} ] } ] @@ -68,18 +44,9 @@ { "type": "RESULT" , "artifacts": { "type": "ACTION" - , "outs": - [ "_out" - ] - , "inputs": - { "type": "var" - , "name": "inputs" - } - , "cmd": - [ "sh" - , "-c" - , "find . -name '*.txt' > _out" - ] + , "outs": ["_out"] + , "inputs": {"type": "var", "name": "inputs"} + , "cmd": ["sh", "-c", "find . -name '*.txt' > _out"] } } } diff --git a/test/buildtool/build_engine/target_map/data_targets/config_targets/TARGETS b/test/buildtool/build_engine/target_map/data_targets/config_targets/TARGETS index 4068efdf..e7c186a4 100644 --- a/test/buildtool/build_engine/target_map/data_targets/config_targets/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/config_targets/TARGETS @@ -1,27 +1,9 @@ { "indirect dependency": - { "type": - [ "simple_rules" - , "upper case" - ] - , "srcs": - [ "use foo" - ] - } + {"type": ["simple_rules", "upper case"], "srcs": ["use foo"]} , "use foo": - { "type": - [ "simple_rules" - , "text file" - ] - , "arguments_config": - [ "foo" - ] - , "name": - [ "foo.txt." - ] - , "content": - [ { "type": "var" - , "name": "foo" - } - ] + { "type": ["simple_rules", "text file"] + , "arguments_config": ["foo"] + , "name": ["foo.txt."] + , "content": [{"type": "var", "name": "foo"}] } } diff --git a/test/buildtool/build_engine/target_map/data_targets/file_reference/TARGETS b/test/buildtool/build_engine/target_map/data_targets/file_reference/TARGETS index 5e62ec6b..9907efbe 100644 --- a/test/buildtool/build_engine/target_map/data_targets/file_reference/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/file_reference/TARGETS @@ -1,9 +1,11 @@ -{ "_hello.txt" : { "type" : "install" - , "files" : { "raw_data/hello.txt" : ["FILE", null, "hello.txt"] } - } -, "hello.txt" : { "type" : "generic" - , "deps" : ["_hello.txt"] - , "outs" : ["hello.txt"] - , "cmds" : ["cat raw_data/hello.txt | tr 'a-z' 'A-Z' > hello.txt"] - } +{ "_hello.txt": + { "type": "install" + , "files": {"raw_data/hello.txt": ["FILE", null, "hello.txt"]} + } +, "hello.txt": + { "type": "generic" + , "deps": ["_hello.txt"] + , "outs": ["hello.txt"] + , "cmds": ["cat raw_data/hello.txt | tr 'a-z' 'A-Z' > hello.txt"] + } } diff --git a/test/buildtool/build_engine/target_map/data_targets/result/TARGETS b/test/buildtool/build_engine/target_map/data_targets/result/TARGETS index e58b1ed5..d46ff3f5 100644 --- a/test/buildtool/build_engine/target_map/data_targets/result/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/result/TARGETS @@ -1,46 +1,8 @@ -{ "artifacts": - { "type": - [ "result" - , "wrong RESULT" - ] - , "artifacts": - [ "YES" - ] - } +{ "artifacts": {"type": ["result", "wrong RESULT"], "artifacts": ["YES"]} , "artifacts entry": - { "type": - [ "result" - , "wrong RESULT" - ] - , "artifacts_entry": - [ "YES" - ] - } -, "runfiles": - { "type": - [ "result" - , "wrong RESULT" - ] - , "runfiles": - [ "YES" - ] - } + {"type": ["result", "wrong RESULT"], "artifacts_entry": ["YES"]} +, "runfiles": {"type": ["result", "wrong RESULT"], "runfiles": ["YES"]} , "runfiles entry": - { "type": - [ "result" - , "wrong RESULT" - ] - , "runfiles_entry": - [ "YES" - ] - } -, "provides": - { "type": - [ "result" - , "wrong RESULT" - ] - , "provides": - [ "YES" - ] - } + {"type": ["result", "wrong RESULT"], "runfiles_entry": ["YES"]} +, "provides": {"type": ["result", "wrong RESULT"], "provides": ["YES"]} } diff --git a/test/buildtool/build_engine/target_map/data_targets/simple_targets/TARGETS b/test/buildtool/build_engine/target_map/data_targets/simple_targets/TARGETS index 1697629b..4306c3ae 100644 --- a/test/buildtool/build_engine/target_map/data_targets/simple_targets/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/simple_targets/TARGETS @@ -1,156 +1,63 @@ -{ "rule just provides": - { "type": - [ "simple_rules" - , "just provide" - ] - } -, "rule provides FOO": - { "type": - [ "simple_rules" - , "provide variable FOO" - ] - } +{ "rule just provides": {"type": ["simple_rules", "just provide"]} +, "rule provides FOO": {"type": ["simple_rules", "provide variable FOO"]} , "config transition for FOO": - { "type": - [ "simple_rules" - , "transition FOO" - ] - , "value": - [ "bar" - , "baz" - ] - , "deps": - [ "rule provides FOO" - ] + { "type": ["simple_rules", "transition FOO"] + , "value": ["bar", "baz"] + , "deps": ["rule provides FOO"] } , "collect dep artifacts": - { "type": - [ "simple_rules" - , "collect deps" - ] - , "deps": - [ "foo.txt" - , "bar.txt" - , "baz.txt" - ] + { "type": ["simple_rules", "collect deps"] + , "deps": ["foo.txt", "bar.txt", "baz.txt"] } , "collect as runfiles": - { "type": - [ "simple_rules" - , "collect deps as runfiles" - ] - , "deps": - [ "foo.txt" - , "bar.txt" - , "baz.txt" - ] + { "type": ["simple_rules", "collect deps as runfiles"] + , "deps": ["foo.txt", "bar.txt", "baz.txt"] } , "stage blob": - { "type": - [ "simple_rules" - , "text file" - ] - , "name": - [ "foo.txt" - ] - , "content": - [ "This is FOO!" - ] - } -, "use implicit": - { "type": - [ "simple_rules" - , "implicit file" - ] + { "type": ["simple_rules", "text file"] + , "name": ["foo.txt"] + , "content": ["This is FOO!"] } +, "use implicit": {"type": ["simple_rules", "implicit file"]} , "actions": - { "type": - [ "simple_rules" - , "upper case" - ] - , "srcs": - [ "foo.txt" - , "bar.txt" - ] - } + {"type": ["simple_rules", "upper case"], "srcs": ["foo.txt", "bar.txt"]} , "artifact names": - { "type": - [ "simple_rules" - , "text file" - ] - , "name": - [ "index.txt" - ] + { "type": ["simple_rules", "text file"] + , "name": ["index.txt"] , "content": [ { "type": "join" , "separator": ";" - , "$1": - { "type": "outs" - , "dep": "collect dep artifacts" - } + , "$1": {"type": "outs", "dep": "collect dep artifacts"} } ] - , "analyze": - [ "collect dep artifacts" - ] + , "analyze": ["collect dep artifacts"] } , "runfile names": - { "type": - [ "simple_rules" - , "text file" - ] - , "name": - [ "index.txt" - ] + { "type": ["simple_rules", "text file"] + , "name": ["index.txt"] , "content": [ { "type": "join" , "separator": ";" - , "$1": - { "type": "runfiles" - , "dep": "collect as runfiles" - } + , "$1": {"type": "runfiles", "dep": "collect as runfiles"} } ] - , "analyze": - [ "collect as runfiles" - ] + , "analyze": ["collect as runfiles"] } , "use generic": { "type": "generic" - , "deps": - [ "foo.txt" - , "bar.txt" - ] - , "cmds": - [ "cat foo.txt bar.txt > out" - , "echo 'DONE' >> out" - ] - , "outs": - [ "out" - ] + , "deps": ["foo.txt", "bar.txt"] + , "cmds": ["cat foo.txt bar.txt > out", "echo 'DONE' >> out"] + , "outs": ["out"] } , "install": { "type": "install" - , "deps": - [ "foo.txt" - , "bar.txt" - ] - , "files": - { "combined.txt": "use generic" - , "subdir/restaged.txt": "bar.txt" - } + , "deps": ["foo.txt", "bar.txt"] + , "files": {"combined.txt": "use generic", "subdir/restaged.txt": "bar.txt"} , "dirs": - [ [ "collect as runfiles" - , "mix/in/this/subdir" - ] - , [ "runfile names" - , "mix/in/this/subdir" - ] + [ ["collect as runfiles", "mix/in/this/subdir"] + , ["runfile names", "mix/in/this/subdir"] ] } , "generate file": - { "type": "file_gen" - , "name": "generated.txt" - , "data": "Hello World!" - } + {"type": "file_gen", "name": "generated.txt", "data": "Hello World!"} } diff --git a/test/buildtool/build_engine/target_map/data_targets/tree/TARGETS b/test/buildtool/build_engine/target_map/data_targets/tree/TARGETS index d08ebb47..e35136e8 100644 --- a/test/buildtool/build_engine/target_map/data_targets/tree/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/tree/TARGETS @@ -1,23 +1,8 @@ { "no conflict": - { "type": - [ "tree" - , "ls -R" - ] - , "tree": - [ [ "simple_targets" - , "collect as runfiles" - ] - ] - , "direct": - [ "foo.txt" - ] + { "type": ["tree", "ls -R"] + , "tree": [["simple_targets", "collect as runfiles"]] + , "direct": ["foo.txt"] } , "range conflict": - { "type": - [ "tree" - , "ls -R" - ] - , "tree": [] - , "direct": ["tree/foo.txt"] - } + {"type": ["tree", "ls -R"], "tree": [], "direct": ["tree/foo.txt"]} } diff --git a/test/buildtool/build_engine/target_map/data_targets/x/x/x/TARGETS b/test/buildtool/build_engine/target_map/data_targets/x/x/x/TARGETS index 115eef20..97814296 100644 --- a/test/buildtool/build_engine/target_map/data_targets/x/x/x/TARGETS +++ b/test/buildtool/build_engine/target_map/data_targets/x/x/x/TARGETS @@ -1,9 +1,9 @@ { "addressing": { "type": "install" , "files": - { "absolute": [ "x/x" , "foo" ] - , "relative": [ "./" , "x/x" , "foo" ] - , "upwards": [ "./" , "../.." , "foo" ] + { "absolute": ["x/x", "foo"] + , "relative": ["./", "x/x", "foo"] + , "upwards": ["./", "../..", "foo"] } } } diff --git a/test/buildtool/common/TARGETS b/test/buildtool/common/TARGETS index d6bcdbf1..1487b1b3 100644 --- a/test/buildtool/common/TARGETS +++ b/test/buildtool/common/TARGETS @@ -38,4 +38,4 @@ , "tainted": ["test"] , "deps": ["action_description", "artifact_description", "artifact_factory"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/crypto/TARGETS b/test/buildtool/crypto/TARGETS index 2f604833..179d70ad 100644 --- a/test/buildtool/crypto/TARGETS +++ b/test/buildtool/crypto/TARGETS @@ -10,4 +10,4 @@ , "stage": ["test", "buildtool", "crypto"] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["crypto"]} -}
\ No newline at end of file +} diff --git a/test/buildtool/execution_api/TARGETS b/test/buildtool/execution_api/TARGETS index a7e5e8cd..cbe272c6 100644 --- a/test/buildtool/execution_api/TARGETS +++ b/test/buildtool/execution_api/TARGETS @@ -27,4 +27,4 @@ , "dirs": [[["./", "bazel", "TESTS"], "bazel"], [["./", "local", "TESTS"], "local"]] } -}
\ No newline at end of file +} diff --git a/test/buildtool/execution_engine/TARGETS b/test/buildtool/execution_engine/TARGETS index 26472eda..5b8b499d 100644 --- a/test/buildtool/execution_engine/TARGETS +++ b/test/buildtool/execution_engine/TARGETS @@ -7,4 +7,4 @@ , [["./", "traverser", "TESTS"], "traverser"] ] } -}
\ No newline at end of file +} diff --git a/test/buildtool/execution_engine/dag/TARGETS b/test/buildtool/execution_engine/dag/TARGETS index 5e63d72f..c6015f16 100644 --- a/test/buildtool/execution_engine/dag/TARGETS +++ b/test/buildtool/execution_engine/dag/TARGETS @@ -12,4 +12,4 @@ , "stage": ["test", "buildtool", "execution_engine", "dag"] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["dag"]} -}
\ No newline at end of file +} diff --git a/test/buildtool/execution_engine/executor/TARGETS b/test/buildtool/execution_engine/executor/TARGETS index 9bf1c50e..0a825fa5 100644 --- a/test/buildtool/execution_engine/executor/TARGETS +++ b/test/buildtool/execution_engine/executor/TARGETS @@ -68,4 +68,4 @@ , "tainted": ["test"] , "deps": ["executor", "local", "remote_bazel"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/execution_engine/traverser/TARGETS b/test/buildtool/execution_engine/traverser/TARGETS index 6a84a91c..7f2192fe 100644 --- a/test/buildtool/execution_engine/traverser/TARGETS +++ b/test/buildtool/execution_engine/traverser/TARGETS @@ -13,4 +13,4 @@ , "stage": ["test", "buildtool", "execution_engine", "traverser"] } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["traverser"]} -}
\ No newline at end of file +} diff --git a/test/buildtool/graph_traverser/TARGETS b/test/buildtool/graph_traverser/TARGETS index c31e569a..f146559f 100644 --- a/test/buildtool/graph_traverser/TARGETS +++ b/test/buildtool/graph_traverser/TARGETS @@ -81,4 +81,4 @@ , "tainted": ["test"] , "deps": ["graph_traverser_local", "graph_traverser_remote"] } -}
\ No newline at end of file +} diff --git a/test/buildtool/logging/TARGETS b/test/buildtool/logging/TARGETS index 3eec70cc..fdf6d2e4 100644 --- a/test/buildtool/logging/TARGETS +++ b/test/buildtool/logging/TARGETS @@ -23,4 +23,4 @@ } , "TESTS": {"type": "install", "tainted": ["test"], "deps": ["log_sink_file", "logger"]} -}
\ No newline at end of file +} diff --git a/test/buildtool/multithreading/TARGETS b/test/buildtool/multithreading/TARGETS index 09fafaa8..47267190 100644 --- a/test/buildtool/multithreading/TARGETS +++ b/test/buildtool/multithreading/TARGETS @@ -73,4 +73,4 @@ , "task_system" ] } -}
\ No newline at end of file +} diff --git a/test/utils/TARGETS b/test/utils/TARGETS index 0ee4d6cc..4ce38cd5 100644 --- a/test/utils/TARGETS +++ b/test/utils/TARGETS @@ -54,4 +54,4 @@ , "stage": ["test", "utils"] } , "TESTS": {"type": "install", "tainted": ["test"]} -}
\ No newline at end of file +} |