bazel_clang_tidy icon indicating copy to clipboard operation
bazel_clang_tidy copied to clipboard

Don't recommend using `git_repository`

Open alexeagle opened this issue 2 years ago • 2 comments

Bazel can't cache the fetch, as documented:

https://bazel.build/docs/external

Prefer http_archive to git_repository and new_git_repository. The reasons are: ... http_archive works with the repository cache, but not git_repository. See #5116 for more information.

alexeagle avatar Mar 21 '22 20:03 alexeagle

It can be fixed with this:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_clang_tidy",
    sha256 = "5a3649ac61413f279310058d90124ecb7c52c5ffb5749d9db10244ffd43225f6",
    strip_prefix = "bazel_clang_tidy-32919e10d57fce09eb714936ba6155aee9a73150",
    url = "https://github.com/dayfoo/bazel_clang_tidy/archive/32919e10d57fce09eb714936ba6155aee9a73150.tar.gz",
)

aminya avatar May 05 '22 19:05 aminya

Perhaps some link to this repo is better (since the Issue is from here): https://github.com/erenon/bazel_clang_tidy/archive/31d62bf825a94468b3d35c5ffd4e014e1c0ff566.tar.gz

igormcoelho avatar Dec 03 '22 21:12 igormcoelho