Bazel: git should be listed as a requirement of bazel

Created on 25 Jul 2019  路  4Comments  路  Source: bazelbuild/bazel

git is needed for git_repository to work, which I learned the hard way as part of bazelbuild/rules_python#208. I believe it should be added to the list of packages in the instructions here.

area-EngProd team-XProduct bug untriaged

All 4 comments

I wouldn't consider git to be a dependency of Bazel since it's used for just one rule, like how the Android SDK or patch(1) aren't dependencies of Bazel.

Well git_repository is a pretty important rule. I'd consider it a recommended dependency at the very least. Otherwise all our examples and recommendations will have to be in terms of http_archive only.

I disagree, it's still not a dependency for installing and running Bazel. At the very least, it should be mentioned in the doc for git_repository instead.

I disagree, it's still not a dependency for installing and running Bazel. At the very least, it should be mentioned in the doc for git_repository instead.

This means every ruleset utilizing git_repository needs to list git (and patch) as dependencies.

After 9cf8ebd it's now at least easier to pinpoint a build failure to missing git. However, I believe it would be helpful and save time if the dependencies of core rules, such as git_repository, were listed as recommended dependencies of Bazel itself.

Similar to the author I ran into this issue in a container-based build environment. Without 9cf8ebd I also had to spend a moment finding the root cause. Listing git and patch right in the Bazel installation guide would have saved me some time and effort.

Was this page helpful?
0 / 5 - 0 ratings