bazelbuild / bazelbuild/bazel

query --output build prints None labels as null

Open
#12,589 11 comments 0 reactions 0 assignees View on GitHub
not stale P4 team-Loading-API type: bug
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

```
$ touch WORKSPACE
$ cat > BUILD
alias(
name = "t",
actual = select({":setting": ":a", "//conditions:default": None}),
)

config_setting(
name = "setting",
define_values = {"a": "1"},
)
$ bazel query --output build //:t
alias(
name = "t",
actual = select({"//:setting": "//:a", "//conditions:default": null}),
)
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the shown BUILD file and `bazel query --output build //:t`; start from the query command's build-output handling. The output should preserve the `None` label instead of emitting `null` for the default select value.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.