bazel_clang_tidy icon indicating copy to clipboard operation
bazel_clang_tidy copied to clipboard

error: error loading package '@bazel_clang_tidy//'

Open boluo250 opened this issue 2 years ago • 2 comments

bazel build //main:hello-world --config clang-tidy

DEBUG: Rule 'bazel_clang_tidy' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1620650326 +0800" DEBUG: Repository bazel_clang_tidy instantiated at: /root/test/2clang_tidy_test/WORKSPACE:7:15: in <toplevel> Repository rule git_repository defined at: /root/.cache/bazel/_bazel_root/c12c70d71c83a34d9ced4530ee069878/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel> ERROR: /root/.cache/bazel/_bazel_root/c12c70d71c83a34d9ced4530ee069878/external/bazel_clang_tidy/clang_tidy/BUILD:1:10: error loading package '@bazel_clang_tidy//': Unable to find package for @com_github_bazelbuild_buildtools//buildifier:def.bzl: The repository '@com_github_bazelbuild_buildtools' could not be resolved. and referenced by '@bazel_clang_tidy//clang_tidy:clang_tidy' ERROR: Analysis of aspect '@bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect of //main:hello-world' failed; build aborted: Analysis failed INFO: Elapsed time: 2.007s INFO: 0 processes. FAILED: Build did NOT complete successfully (18 packages loaded, 58 targets configured)

WORKSPACE `load( "@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", )

git_repository( name = "bazel_clang_tidy", commit = "69aa13e6d7cf102df70921c66be15d4592251e56", remote = "https://github.com/erenon/bazel_clang_tidy.git", )`

.bazelrc build:clang-tidy --aspects @bazel_clang_tidy//clang_tidy:clang_tidy.bzl%clang_tidy_aspect build:clang-tidy --output_groups=report

main/BUILD cc_binary( name = "hello-world", srcs = ["hello-world.cc"], visibility = ["//visibility:public"], )

boluo250 avatar Apr 27 '22 10:04 boluo250

I had the same issue. I updated the commit to "783aa523aafb4a6798a538c61e700b6ed27975a7". That issue is gone now.

aminya avatar May 05 '22 19:05 aminya

I had the same issue. I updated the commit to "783aa523aafb4a6798a538c61e700b6ed27975a7". That issue is gone now. i change the commit,but has the same problem.

boluo250 avatar May 06 '22 02:05 boluo250