Duplicate --config=foo produces a seemingly pointless warning
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
As of Bazel 3.2.0, if you have `build --config=foo` in multiple places (like `.bazelrc` and `~/.bazelrc`), `bazel build` produces the following warning:
> WARNING: The following configs were expanded more than once: [foo]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
It's not clear under which scenario `--config=foo` may be "repeatable" or produce "unexpected behavior". To my understanding, such a thing cannot happen, and hence the warning seems like a bug. There does not appear to be any conflict in the requested flags. Could the warning be removed?
Contributor guide
Research direction
Start by reproducing the warning with duplicate build --config=foo entries in .bazelrc and ~/.bazelrc, then locate the Bazel code that expands configs and emits this warning. Determine whether duplicate configs can affect repeatable flags, and use the relevant existing tests if found; done means the warning is removed or its behavior and expected handling are clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100