bazelbuild/bazel

Duplicate --config=foo produces a seemingly pointless warning

Open

#11,592 opened on Jun 15, 2020

View on GitHub
 (7 comments) (0 reactions) (0 assignees)Java (4,465 forks)batch import
P3help wantedteam-Configurabilityteam-Documentationtype: documentation (cleanup)

Repository metrics

Stars
 (25,384 stars)
PR merge metrics
 (Avg merge 22d 20h) (77 merged PRs in 30d)

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