Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't recommend using git_repository #17

Open
alexeagle opened this issue Mar 21, 2022 · 2 comments
Open

Don't recommend using git_repository #17

alexeagle opened this issue Mar 21, 2022 · 2 comments

Comments

@alexeagle
Copy link
Contributor

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.

@aminya
Copy link

aminya commented May 5, 2022

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

@igormcoelho
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants