From 3a448640c177c184680241a9b2319cec8b2bc4ce Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 8 May 2024 12:19:52 +0100 Subject: [PATCH] Update to latest gazelle (#275) --- MODULE.bazel | 2 +- WORKSPACE | 4 ++-- examples/gazelle/MODULE.bazel | 2 +- .../src/test/java/com/example/test/BUILD.out | 2 +- .../grpc/src/main/proto/example/hello/BUILD.out | 2 +- .../testdata/module_granularity/module1/BUILD.out | 2 +- .../default/src/main/proto/example/hello/BUILD.out | 2 +- .../src/main/proto/example/hello/BUILD.out | 2 +- java/private/checkstyle.bzl | 2 +- java/private/non-module-deps.bzl | 2 +- java/private/pmd.bzl | 2 +- java/private/spotbugs.bzl | 2 +- repositories.bzl | 10 +++++----- 13 files changed, 18 insertions(+), 18 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 4d2103fe..233e6df1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -28,7 +28,7 @@ bazel_dep( bazel_dep( name = "gazelle", - version = "0.34.0", + version = "0.36.0", repo_name = "bazel_gazelle", ) bazel_dep( diff --git a/WORKSPACE b/WORKSPACE index 1b92f9be..bcaf962c 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -36,8 +36,8 @@ load("//:gazelle_setup.bzl", "contrib_rules_jvm_gazelle_setup") contrib_rules_jvm_gazelle_setup() -load("@rules_jvm_external//:defs.bzl", "maven_install") load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS") +load("@rules_jvm_external//:defs.bzl", "maven_install") load("//third_party:protobuf_version.bzl", "PROTOBUF_JAVA_VERSION") # This only exists to give us a target to use with `./tools/update-dependencies.sh`. @@ -143,8 +143,8 @@ load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") stardoc_repositories() -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() diff --git a/examples/gazelle/MODULE.bazel b/examples/gazelle/MODULE.bazel index 0df2b3d5..c01c0032 100644 --- a/examples/gazelle/MODULE.bazel +++ b/examples/gazelle/MODULE.bazel @@ -41,5 +41,5 @@ use_repo( bazel_dep( name = "gazelle", - version = "0.34.0", + version = "0.36.0", ) diff --git a/java/gazelle/testdata/bin_in_test_tree/src/test/java/com/example/test/BUILD.out b/java/gazelle/testdata/bin_in_test_tree/src/test/java/com/example/test/BUILD.out index 23726467..b9e4b626 100644 --- a/java/gazelle/testdata/bin_in_test_tree/src/test/java/com/example/test/BUILD.out +++ b/java/gazelle/testdata/bin_in_test_tree/src/test/java/com/example/test/BUILD.out @@ -1,5 +1,5 @@ -load("@rules_java//java:defs.bzl", "java_binary") load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") +load("@rules_java//java:defs.bzl", "java_binary") java_binary( name = "SomeTestBinary", diff --git a/java/gazelle/testdata/grpc/src/main/proto/example/hello/BUILD.out b/java/gazelle/testdata/grpc/src/main/proto/example/hello/BUILD.out index 6d427df2..e8d629a5 100644 --- a/java/gazelle/testdata/grpc/src/main/proto/example/hello/BUILD.out +++ b/java/gazelle/testdata/grpc/src/main/proto/example/hello/BUILD.out @@ -1,6 +1,6 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library") load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "example_hello_proto", diff --git a/java/gazelle/testdata/module_granularity/module1/BUILD.out b/java/gazelle/testdata/module_granularity/module1/BUILD.out index b09392e9..cfa65db3 100644 --- a/java/gazelle/testdata/module_granularity/module1/BUILD.out +++ b/java/gazelle/testdata/module_granularity/module1/BUILD.out @@ -1,5 +1,5 @@ -load("@rules_java//java:defs.bzl", "java_binary", "java_library") load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") +load("@rules_java//java:defs.bzl", "java_binary", "java_library") # gazelle:java_module_granularity module diff --git a/java/gazelle/testdata/proto/default/src/main/proto/example/hello/BUILD.out b/java/gazelle/testdata/proto/default/src/main/proto/example/hello/BUILD.out index eadb790c..2741449e 100644 --- a/java/gazelle/testdata/proto/default/src/main/proto/example/hello/BUILD.out +++ b/java/gazelle/testdata/proto/default/src/main/proto/example/hello/BUILD.out @@ -1,5 +1,5 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") proto_library( name = "example_hello_proto", diff --git a/java/gazelle/testdata/proto/generate_true/src/main/proto/example/hello/BUILD.out b/java/gazelle/testdata/proto/generate_true/src/main/proto/example/hello/BUILD.out index 73607aee..867b6ed0 100644 --- a/java/gazelle/testdata/proto/generate_true/src/main/proto/example/hello/BUILD.out +++ b/java/gazelle/testdata/proto/generate_true/src/main/proto/example/hello/BUILD.out @@ -1,5 +1,5 @@ -load("@rules_proto//proto:defs.bzl", "proto_library") load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") # gazelle:java_generate_proto true diff --git a/java/private/checkstyle.bzl b/java/private/checkstyle.bzl index 145bbb9a..bedec371 100644 --- a/java/private/checkstyle.bzl +++ b/java/private/checkstyle.bzl @@ -1,6 +1,6 @@ -load(":checkstyle_config.bzl", "CheckStyleInfo") load("@apple_rules_lint//lint:defs.bzl", "LinterInfo") load("@bazel_skylib//lib:paths.bzl", "paths") +load(":checkstyle_config.bzl", "CheckStyleInfo") """ Checkstyle rule implementation diff --git a/java/private/non-module-deps.bzl b/java/private/non-module-deps.bzl index a0dc76b5..6a7ea875 100644 --- a/java/private/non-module-deps.bzl +++ b/java/private/non-module-deps.bzl @@ -1,5 +1,5 @@ -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("//:repositories.bzl", "io_grpc_grpc_java") def _non_module_dependencies_impl(mctx): diff --git a/java/private/pmd.bzl b/java/private/pmd.bzl index c8c24f10..9c17732f 100644 --- a/java/private/pmd.bzl +++ b/java/private/pmd.bzl @@ -1,5 +1,5 @@ -load(":pmd_ruleset.bzl", "PmdInfo") load("@apple_rules_lint//lint:defs.bzl", "LinterInfo") +load(":pmd_ruleset.bzl", "PmdInfo") def _pmd_test_impl(ctx): pmd_info = ctx.attr.ruleset[PmdInfo] diff --git a/java/private/spotbugs.bzl b/java/private/spotbugs.bzl index 8cf629c0..120dde2b 100644 --- a/java/private/spotbugs.bzl +++ b/java/private/spotbugs.bzl @@ -1,5 +1,5 @@ -load(":spotbugs_config.bzl", "SpotBugsInfo") load("@apple_rules_lint//lint:defs.bzl", "LinterInfo") +load(":spotbugs_config.bzl", "SpotBugsInfo") """ Spotbugs integration logic diff --git a/repositories.bzl b/repositories.bzl index c78cd5d7..dddfb19e 100644 --- a/repositories.bzl +++ b/repositories.bzl @@ -104,16 +104,16 @@ def contrib_rules_jvm_gazelle_deps(): maybe( http_archive, name = "bazel_gazelle", - sha256 = "b7387f72efb59f876e4daae42f1d3912d0d45563eac7cb23d1de0b094ab588cf", - url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.34.0/bazel-gazelle-v0.34.0.tar.gz", + sha256 = "75df288c4b31c81eb50f51e2e14f4763cb7548daae126817247064637fd9ea62", + url = "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.36.0/bazel-gazelle-v0.36.0.tar.gz", ) maybe( http_archive, name = "com_github_bazelbuild_buildtools", - sha256 = "05c3c3602d25aeda1e9dbc91d3b66e624c1f9fdadf273e5480b489e744ca7269", - strip_prefix = "buildtools-6.4.0", - url = "https://github.com/bazelbuild/buildtools/archive/refs/tags/v6.4.0.tar.gz", + sha256 = "061472b3e8b589fb42233f0b48798d00cf9dee203bd39502bd294e6b050bc6c2", + strip_prefix = "buildtools-7.1.0", + url = "https://github.com/bazelbuild/buildtools/archive/refs/tags/v7.1.0.tar.gz", ) maybe(