From 2a31bc716eb2f314bbc75d3f3b065ede6b1c2bcb Mon Sep 17 00:00:00 2001 From: ADD-SP Date: Sun, 29 Sep 2024 08:05:57 +0000 Subject: [PATCH] chore(Bazel): format Bazel files by Bazel Buildifier --- BUILD.bazel | 2 +- build/BUILD.bazel | 4 ++-- build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel | 2 +- build/cross_deps/libyaml/BUILD.libyaml.bazel | 2 +- build/cross_deps/libyaml/repositories.bzl | 2 +- build/cross_deps/repositories.bzl | 4 ++-- build/cross_deps/zlib/BUILD.zlib.bazel | 2 +- build/cross_deps/zlib/repositories.bzl | 2 +- build/libexpat/BUILD.libexpat.bazel | 2 +- build/libexpat/repositories.bzl | 2 +- build/luarocks/BUILD.luarocks.bazel | 6 +++--- build/openresty/BUILD.openresty.bazel | 8 ++++---- .../openresty/atc_router/atc_router_repositories.bzl | 2 +- build/openresty/brotli/brotli_repositories.bzl | 2 +- build/openresty/openssl/openssl.bzl | 2 +- build/openresty/pcre/BUILD.pcre.bazel | 2 +- build/openresty/repositories.bzl | 12 ++++++------ .../simdjson_ffi/simdjson_ffi_repositories.bzl | 2 +- build/openresty/wasmx/wasmx_repositories.bzl | 2 +- build/repositories.bzl | 6 +++--- build/toolchain/cc_toolchain_config.bzl | 2 +- 21 files changed, 35 insertions(+), 35 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 20c265c370ea..4602b77e02d3 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,5 @@ -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag") load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag") load("//build/nfpm:rules.bzl", "nfpm_pkg") load("//build/toolchain:managed_toolchain.bzl", "aarch64_glibc_distros") diff --git a/build/BUILD.bazel b/build/BUILD.bazel index 3822ba21373a..27c190841a7d 100644 --- a/build/BUILD.bazel +++ b/build/BUILD.bazel @@ -1,7 +1,7 @@ -load("@kong_bindings//:variables.bzl", "KONG_VAR") load("@bazel_skylib//lib:selects.bzl", "selects") -load("//build:build_system.bzl", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file") load("@kong//build/openresty/wasmx/filters:variables.bzl", "WASM_FILTERS_TARGETS") +load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build:build_system.bzl", "get_workspace_name", "kong_genrule", "kong_install", "kong_rules_group", "kong_template_file") exports_files([ "package/nfpm.yaml", diff --git a/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel b/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel index 474ae5251b13..1be6e107c846 100644 --- a/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel +++ b/build/cross_deps/libxcrypt/BUILD.libxcrypt.bazel @@ -1,6 +1,6 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") load("@bazel_skylib//lib:selects.bzl", "selects") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") filegroup( name = "all_srcs", diff --git a/build/cross_deps/libyaml/BUILD.libyaml.bazel b/build/cross_deps/libyaml/BUILD.libyaml.bazel index 8739719983dd..68085aafe366 100644 --- a/build/cross_deps/libyaml/BUILD.libyaml.bazel +++ b/build/cross_deps/libyaml/BUILD.libyaml.bazel @@ -1,5 +1,5 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") filegroup( name = "all_srcs", diff --git a/build/cross_deps/libyaml/repositories.bzl b/build/cross_deps/libyaml/repositories.bzl index dffd0798cde6..8445ad1e8861 100644 --- a/build/cross_deps/libyaml/repositories.bzl +++ b/build/cross_deps/libyaml/repositories.bzl @@ -1,7 +1,7 @@ """A module defining the third party dependency OpenResty""" -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def libyaml_repositories(): """Defines the libyaml repository""" diff --git a/build/cross_deps/repositories.bzl b/build/cross_deps/repositories.bzl index a2afddfc9e9d..ed13116f3e5e 100644 --- a/build/cross_deps/repositories.bzl +++ b/build/cross_deps/repositories.bzl @@ -1,6 +1,6 @@ -load("//build/cross_deps/zlib:repositories.bzl", "zlib_repositories") -load("//build/cross_deps/libyaml:repositories.bzl", "libyaml_repositories") load("//build/cross_deps/libxcrypt:repositories.bzl", "libxcrypt_repositories") +load("//build/cross_deps/libyaml:repositories.bzl", "libyaml_repositories") +load("//build/cross_deps/zlib:repositories.bzl", "zlib_repositories") def cross_deps_repositories(): zlib_repositories() diff --git a/build/cross_deps/zlib/BUILD.zlib.bazel b/build/cross_deps/zlib/BUILD.zlib.bazel index a82ac6977817..79be90c0bd6e 100644 --- a/build/cross_deps/zlib/BUILD.zlib.bazel +++ b/build/cross_deps/zlib/BUILD.zlib.bazel @@ -1,5 +1,5 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") filegroup( name = "all_srcs", diff --git a/build/cross_deps/zlib/repositories.bzl b/build/cross_deps/zlib/repositories.bzl index 325c23a5ac3f..e8fc13dce305 100644 --- a/build/cross_deps/zlib/repositories.bzl +++ b/build/cross_deps/zlib/repositories.bzl @@ -1,7 +1,7 @@ """A module defining the third party dependency OpenResty""" -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def zlib_repositories(): """Defines the zlib repository""" diff --git a/build/libexpat/BUILD.libexpat.bazel b/build/libexpat/BUILD.libexpat.bazel index 49a4092cd824..e443b86afac7 100644 --- a/build/libexpat/BUILD.libexpat.bazel +++ b/build/libexpat/BUILD.libexpat.bazel @@ -1,5 +1,5 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") filegroup( name = "all_srcs", diff --git a/build/libexpat/repositories.bzl b/build/libexpat/repositories.bzl index c839bd487983..0c66c0a7340a 100644 --- a/build/libexpat/repositories.bzl +++ b/build/libexpat/repositories.bzl @@ -1,7 +1,7 @@ """A module defining the third party dependency OpenResty""" -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@kong_bindings//:variables.bzl", "KONG_VAR") def libexpat_repositories(): diff --git a/build/luarocks/BUILD.luarocks.bazel b/build/luarocks/BUILD.luarocks.bazel index db444678c85c..b23ad9609ba8 100644 --- a/build/luarocks/BUILD.luarocks.bazel +++ b/build/luarocks/BUILD.luarocks.bazel @@ -1,6 +1,6 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") load("@kong//build:build_system.bzl", "kong_template_genrule") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") filegroup( name = "all_srcs", @@ -39,8 +39,8 @@ configure_make( kong_template_genrule( name = "luarocks_exec", srcs = [ - "@openssl//:openssl", - "@libexpat//:libexpat", + "@libexpat", + "@openssl", ] + select({ "@kong//:any-cross": ["@cross_deps_libyaml//:libyaml"], "//conditions:default": [ diff --git a/build/openresty/BUILD.openresty.bazel b/build/openresty/BUILD.openresty.bazel index 525d551252f8..81ad1724f89c 100644 --- a/build/openresty/BUILD.openresty.bazel +++ b/build/openresty/BUILD.openresty.bazel @@ -1,10 +1,10 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make", "make") load("@bazel_skylib//lib:selects.bzl", "selects") -load("@kong//build/openresty/wasmx:rules.bzl", "wasm_runtime", "wasmx_configure_options", "wasmx_env") load("@kong//build:build_system.bzl", "kong_cc_static_library") -load("@openresty_binding//:variables.bzl", "LUAJIT_VERSION") -load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@kong//build/openresty/wasmx:rules.bzl", "wasm_runtime", "wasmx_configure_options", "wasmx_env") load("@kong//build/openresty/wasmx/filters:variables.bzl", "WASM_FILTERS_TARGETS") +load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@openresty_binding//:variables.bzl", "LUAJIT_VERSION") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make", "make") filegroup( name = "luajit_srcs", diff --git a/build/openresty/atc_router/atc_router_repositories.bzl b/build/openresty/atc_router/atc_router_repositories.bzl index ce71993b7543..d4474bcff340 100644 --- a/build/openresty/atc_router/atc_router_repositories.bzl +++ b/build/openresty/atc_router/atc_router_repositories.bzl @@ -1,7 +1,7 @@ """A module defining the dependency atc-router""" -load("//build:build_system.bzl", "git_or_local_repository") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build:build_system.bzl", "git_or_local_repository") def atc_router_repositories(): git_or_local_repository( diff --git a/build/openresty/brotli/brotli_repositories.bzl b/build/openresty/brotli/brotli_repositories.bzl index d3e020039f38..1f2afc40c382 100644 --- a/build/openresty/brotli/brotli_repositories.bzl +++ b/build/openresty/brotli/brotli_repositories.bzl @@ -1,8 +1,8 @@ """A module defining the dependency """ -load("//build:build_system.bzl", "git_or_local_repository") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build:build_system.bzl", "git_or_local_repository") def brotli_repositories(): maybe( diff --git a/build/openresty/openssl/openssl.bzl b/build/openresty/openssl/openssl.bzl index d17582b5ba57..1390dd6e500a 100644 --- a/build/openresty/openssl/openssl.bzl +++ b/build/openresty/openssl/openssl.bzl @@ -5,8 +5,8 @@ Note that the $(PERL) "make variable" (https://docs.bazel.build/versions/main/be is populated by the perl toolchain provided by rules_perl. """ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") # Read https://wiki.openssl.org/index.php/Compilation_and_Installation diff --git a/build/openresty/pcre/BUILD.pcre.bazel b/build/openresty/pcre/BUILD.pcre.bazel index 023f08b3a44f..bd0041c71a15 100644 --- a/build/openresty/pcre/BUILD.pcre.bazel +++ b/build/openresty/pcre/BUILD.pcre.bazel @@ -1,5 +1,5 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") filegroup( name = "all_srcs", diff --git a/build/openresty/repositories.bzl b/build/openresty/repositories.bzl index bb1e7389f58a..f4cafe9d2d1b 100644 --- a/build/openresty/repositories.bzl +++ b/build/openresty/repositories.bzl @@ -2,17 +2,17 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") -load("//build:build_system.bzl", "git_or_local_repository") load("@kong_bindings//:variables.bzl", "KONG_VAR") -load("//build/openresty/pcre:pcre_repositories.bzl", "pcre_repositories") +load("//build:build_system.bzl", "git_or_local_repository") +load("//build/openresty/ada:ada_repositories.bzl", "ada_repositories") +load("//build/openresty/atc_router:atc_router_repositories.bzl", "atc_router_repositories") +load("//build/openresty/brotli:brotli_repositories.bzl", "brotli_repositories") load("//build/openresty/openssl:openssl_repositories.bzl", "openssl_repositories") +load("//build/openresty/pcre:pcre_repositories.bzl", "pcre_repositories") load("//build/openresty/simdjson_ffi:simdjson_ffi_repositories.bzl", "simdjson_ffi_repositories") -load("//build/openresty/atc_router:atc_router_repositories.bzl", "atc_router_repositories") +load("//build/openresty/snappy:snappy_repositories.bzl", "snappy_repositories") load("//build/openresty/wasmx:wasmx_repositories.bzl", "wasmx_repositories") load("//build/openresty/wasmx/filters:repositories.bzl", "wasm_filters_repositories") -load("//build/openresty/brotli:brotli_repositories.bzl", "brotli_repositories") -load("//build/openresty/snappy:snappy_repositories.bzl", "snappy_repositories") -load("//build/openresty/ada:ada_repositories.bzl", "ada_repositories") # This is a dummy file to export the module's repository. _NGINX_MODULE_DUMMY_FILE = """ diff --git a/build/openresty/simdjson_ffi/simdjson_ffi_repositories.bzl b/build/openresty/simdjson_ffi/simdjson_ffi_repositories.bzl index 0d9649c9560c..cc083738f800 100644 --- a/build/openresty/simdjson_ffi/simdjson_ffi_repositories.bzl +++ b/build/openresty/simdjson_ffi/simdjson_ffi_repositories.bzl @@ -1,7 +1,7 @@ """A module defining the dependency lua-resty-simdjson""" -load("//build:build_system.bzl", "git_or_local_repository") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build:build_system.bzl", "git_or_local_repository") def simdjson_ffi_repositories(): git_or_local_repository( diff --git a/build/openresty/wasmx/wasmx_repositories.bzl b/build/openresty/wasmx/wasmx_repositories.bzl index a797ffc1207a..7e7df89ca380 100644 --- a/build/openresty/wasmx/wasmx_repositories.bzl +++ b/build/openresty/wasmx/wasmx_repositories.bzl @@ -1,8 +1,8 @@ """A module defining the third party dependency WasmX""" -load("//build:build_system.bzl", "git_or_local_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build:build_system.bzl", "git_or_local_repository") wasm_runtime_build_file = """ filegroup( diff --git a/build/repositories.bzl b/build/repositories.bzl index 9b808b4cdde2..4004b32f747f 100644 --- a/build/repositories.bzl +++ b/build/repositories.bzl @@ -1,12 +1,12 @@ """A module defining the third party dependency OpenResty""" -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") +load("@kong_bindings//:variables.bzl", "KONG_VAR") load("//build:build_system.bzl", "git_or_local_repository", "github_release") -load("//build/luarocks:luarocks_repositories.bzl", "luarocks_repositories") load("//build/cross_deps:repositories.bzl", "cross_deps_repositories") load("//build/libexpat:repositories.bzl", "libexpat_repositories") -load("@kong_bindings//:variables.bzl", "KONG_VAR") +load("//build/luarocks:luarocks_repositories.bzl", "luarocks_repositories") load("//build/toolchain:bindings.bzl", "load_bindings") _SRCS_BUILD_FILE_CONTENT = """ diff --git a/build/toolchain/cc_toolchain_config.bzl b/build/toolchain/cc_toolchain_config.bzl index 60b7e12c88aa..bf58f99ad9ab 100644 --- a/build/toolchain/cc_toolchain_config.bzl +++ b/build/toolchain/cc_toolchain_config.bzl @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_path", "with_feature_set") load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") +load("@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "feature", "flag_group", "flag_set", "tool_path", "with_feature_set") load("@toolchain_bindings//:variables.bzl", "INTERNAL_ROOT") all_compile_actions = [