erenon / bazel_clang_tidy

Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
MIT License
109 stars 58 forks source link

error: error loading package '@bazel_clang_tidy//' #18

Closed boluo250 closed 9 months ago

boluo250 commented 2 years ago

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"], )

aminya commented 2 years ago

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

boluo250 commented 2 years ago

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.