From 96d7cff7250357ca007938e49a47d510237c1c1d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 25 Aug 2023 11:20:22 -0700 Subject: [PATCH] Update buildifier (#252) --- .pre-commit-config.yaml | 2 +- crosstool/cc_toolchain_config.bzl | 2 +- crosstool/osx_cc_configure.bzl | 2 +- lib/lipo.bzl | 2 +- rules/private/apple_genrule.bzl | 2 +- rules/rules.doc.bzl | 2 +- rules/universal_binary.bzl | 2 +- test/BUILD | 8 ++++---- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a92994c..47f6895 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/keith/pre-commit-buildifier - rev: 6.0.0 + rev: 6.3.3 hooks: - id: buildifier - id: buildifier-lint diff --git a/crosstool/cc_toolchain_config.bzl b/crosstool/cc_toolchain_config.bzl index 8d36f64..6ff64f8 100644 --- a/crosstool/cc_toolchain_config.bzl +++ b/crosstool/cc_toolchain_config.bzl @@ -13,6 +13,7 @@ # limitations under the License. """A C++ toolchain configuration rule for macOS.""" +load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") load( "@bazel_tools//tools/cpp:cc_toolchain_config_lib.bzl", "action_config", @@ -29,7 +30,6 @@ load( "variable_with_value", "with_feature_set", ) -load("@bazel_tools//tools/build_defs/cc:action_names.bzl", "ACTION_NAMES") # TODO: Remove when we drop bazel 6.x support _OBJC_ARCHIVE_ACTION_NAME = "objc-archive" diff --git a/crosstool/osx_cc_configure.bzl b/crosstool/osx_cc_configure.bzl index 3b9678a..94d4ca4 100644 --- a/crosstool/osx_cc_configure.bzl +++ b/crosstool/osx_cc_configure.bzl @@ -14,11 +14,11 @@ # limitations under the License. """Configuring the C++ toolchain on macOS.""" -load("@bazel_tools//tools/osx:xcode_configure.bzl", "run_xcode_locator") load( "@bazel_tools//tools/cpp:lib_cc_configure.bzl", "escape_string", ) +load("@bazel_tools//tools/osx:xcode_configure.bzl", "run_xcode_locator") def _get_escaped_xcode_cxx_inc_directories(repository_ctx, xcode_toolchains): """Compute the list of default C++ include paths on Xcode-enabled darwin. diff --git a/lib/lipo.bzl b/lib/lipo.bzl index f826243..8bf6b54 100644 --- a/lib/lipo.bzl +++ b/lib/lipo.bzl @@ -14,11 +14,11 @@ """APIs for operating on universal binaries with `lipo`.""" -load(":apple_support.bzl", "apple_support") load( "@bazel_skylib//lib:shell.bzl", "shell", ) +load(":apple_support.bzl", "apple_support") def _create( *, diff --git a/rules/private/apple_genrule.bzl b/rules/private/apple_genrule.bzl index 5b3d36a..b00395e 100644 --- a/rules/private/apple_genrule.bzl +++ b/rules/private/apple_genrule.bzl @@ -14,8 +14,8 @@ """Genrule which provides Apple's Xcode environment.""" -load("//lib:apple_support.bzl", "apple_support") load("@bazel_skylib//lib:dicts.bzl", "dicts") +load("//lib:apple_support.bzl", "apple_support") def _compute_make_variables( genfiles_dir, diff --git a/rules/rules.doc.bzl b/rules/rules.doc.bzl index 534725a..dbf7cf4 100644 --- a/rules/rules.doc.bzl +++ b/rules/rules.doc.bzl @@ -2,9 +2,9 @@ # Helper rules for Apple platforms """ -load("//rules/private:apple_genrule.bzl", _apple_genrule = "apple_genrule") load("//rules:toolchain_substitution.bzl", _toolchain_substitution = "toolchain_substitution") load("//rules:universal_binary.bzl", _universal_binary = "universal_binary") +load("//rules/private:apple_genrule.bzl", _apple_genrule = "apple_genrule") apple_genrule = _apple_genrule toolchain_substitution = _toolchain_substitution diff --git a/rules/universal_binary.bzl b/rules/universal_binary.bzl index afe2cd2..5c0eca5 100644 --- a/rules/universal_binary.bzl +++ b/rules/universal_binary.bzl @@ -14,10 +14,10 @@ """Implementation for macOS universal binary rule.""" +load("@bazel_skylib//lib:dicts.bzl", "dicts") load("//lib:apple_support.bzl", "apple_support") load("//lib:lipo.bzl", "lipo") load("//lib:transitions.bzl", "macos_universal_transition") -load("@bazel_skylib//lib:dicts.bzl", "dicts") def _universal_binary_impl(ctx): inputs = [ diff --git a/test/BUILD b/test/BUILD index fb17576..a5a0914 100644 --- a/test/BUILD +++ b/test/BUILD @@ -1,12 +1,12 @@ -load("//rules:apple_genrule.bzl", "apple_genrule") load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load("@bazel_skylib//rules:build_test.bzl", "build_test") +load("//rules:apple_genrule.bzl", "apple_genrule") load(":apple_support_test.bzl", "apple_support_test") -load(":universal_binary_test.bzl", "universal_binary_test") -load(":xcode_support_test.bzl", "xcode_support_test") -load(":starlark_apple_binary.bzl", "starlark_apple_binary") load(":binary_tests.bzl", "binary_test_suite") load(":linking_tests.bzl", "linking_test_suite") +load(":starlark_apple_binary.bzl", "starlark_apple_binary") +load(":universal_binary_test.bzl", "universal_binary_test") +load(":xcode_support_test.bzl", "xcode_support_test") licenses(["notice"])