bazelbuild / bazelbuild/bazel

'Config value is not defined' when referenced with 'common' in bazelrc

Open
#23,213 2 comments 1 reaction 1 assignee Claimed by @fmeum View on GitHub
team-Core type: bug untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 16h
Merged PRs (30d)
72

Description

### Description of the bug:

```
$ echo "common:abc --config=xyz" >> .bazelrc
$ echo "build:xyz --define=a=1" >> .bazelrc
$ bazel query --config=abc
ERROR: Config value 'xyz' is not defined in any .rc file
```

Not sure if this case was ever thought through or whether it is worth fixing, but I ran into it today in my own work. @fmeum please comment on whether you think it's worth improving this scenario. I can work around it (by replacing `common:abc` with `build:abc`), so it's not too much of a priority, just wanted to make sure it was tracked in an issue.

### Which category does this issue belong to?

Core

### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

_No response_

### Which operating system are you running Bazel on?

_No response_

### What is the output of `bazel info release`?

_No response_

### 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` ?

_No response_

### If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

_No response_

### Have you found anything relevant by searching the web?

_No response_

### Any other information, logs, or outputs that you want to share?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.