Disable DEBUG print from git_repository() and http_archive()
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
We try to follow the rule that builds should be quiet if there is not a fault.
The two rules provided by bazel, git_repository() and http_archive() produce DEBUG prints when e.g. the [tag](https://bazel.build/rules/lib/repo/git#git_repository-tag) argument is used.
We are aware of the hints written in the DEBUG prints but, we still want to use the tag. So we would like to turn of the information via a command line option to bazel.
We know of the option --ui_event_filters=-DEBUG, but then we turn off all debug information that could be valid during development and find things that we would like to fix.
### Which category does this issue belong to?
Core
### What underlying problem are you trying to solve with this feature?
We want to have quiet builds.
### Which operating system are you running Bazel on?
Linux
### What is the output of `bazel info release`?
release 7.5.0
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
Typical printout that we do not want to see.
DEBUG: Rule 'my_example' indicated that a canonical reproducible form can be obtained by modifying arguments commit = "98924b47603c4135d1db6dc0efb8f7a10f381223" and dropping ["tag"]
DEBUG: Repository my_example instantiated at:
: in
Repository rule git_repository defined at:
.bazel_user_root/4e989bacec1ea5b49c3411396417d042/external/bazel_tools/tools/build_defs/repo/git.bzl:189:33: in
Contributor guide
Research direction
Start with the git_repository definition at .bazel_user_root/.../external/bazel_tools/tools/build_defs/repo/git.bzl:189:33 and compare it with http_archive, then trace how their DEBUG output reaches --ui_event_filters. Done means a command-line option suppresses these reproducibility hints while leaving unrelated DEBUG information visible.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100