chore: update to latest buildifier (#3386)
Upgrade to the latest buildifier and fix an example.
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index 6ed93b0..1cb3a01 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -16,7 +16,7 @@
buildifier:
# keep these arguments in sync with .pre-commit-config.yaml
# Use a specific version to avoid skew issues when new versions are released.
- version: 6.1.0
+ version: 8.2.1
warnings: "all"
# NOTE: Minimum supported version is 7.x
.minimum_supported_version: &minimum_supported_version
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 67a02fc..91e449f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,7 +21,7 @@
hooks:
- id: check-merge-conflict
- repo: https://github.com/keith/pre-commit-buildifier
- rev: 6.1.0
+ rev: 8.2.1
hooks:
- id: buildifier
args: &args
diff --git a/examples/multi_python_versions/MODULE.bazel b/examples/multi_python_versions/MODULE.bazel
index 4e4a047..eeb1dfc 100644
--- a/examples/multi_python_versions/MODULE.bazel
+++ b/examples/multi_python_versions/MODULE.bazel
@@ -35,6 +35,7 @@
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
use_repo(pip, "pypi")
+
pip.parse(
hub_name = "pypi",
python_version = "3.9",
diff --git a/examples/pip_parse_vendored/BUILD.bazel b/examples/pip_parse_vendored/BUILD.bazel
index 8d81e4b..74b9286 100644
--- a/examples/pip_parse_vendored/BUILD.bazel
+++ b/examples/pip_parse_vendored/BUILD.bazel
@@ -3,6 +3,7 @@
load("@bazel_skylib//rules:write_file.bzl", "write_file")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
load("@rules_python//python:py_test.bzl", "py_test")
+load("@rules_shell//shell:sh_binary.bzl", "sh_binary")
load("//:requirements.bzl", "all_data_requirements", "all_requirements", "all_whl_requirements", "requirement")
# This rule adds a convenient way to update the requirements.txt
diff --git a/examples/pip_parse_vendored/WORKSPACE b/examples/pip_parse_vendored/WORKSPACE
index d7a11ea..5e80b41 100644
--- a/examples/pip_parse_vendored/WORKSPACE
+++ b/examples/pip_parse_vendored/WORKSPACE
@@ -39,3 +39,19 @@
load("//:requirements.bzl", "install_deps")
install_deps()
+
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+# See https://github.com/bazelbuild/rules_shell/releases/tag/v0.2.0
+http_archive(
+ name = "rules_shell",
+ sha256 = "410e8ff32e018b9efd2743507e7595c26e2628567c42224411ff533b57d27c28",
+ strip_prefix = "rules_shell-0.2.0",
+ url = "https://github.com/bazelbuild/rules_shell/releases/download/v0.2.0/rules_shell-v0.2.0.tar.gz",
+)
+
+load("@rules_shell//shell:repositories.bzl", "rules_shell_dependencies", "rules_shell_toolchains")
+
+rules_shell_dependencies()
+
+rules_shell_toolchains()