bazelbuild / bazelbuild/bazel

cquery --output=files assume convenience symlinks are enabled

Open
#16,277 7 comments 2 reactions 0 assignees View on GitHub
help wanted P3 team-Configurability team-Documentation type: documentation (cleanup)
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the bug:

Bazel cquery `--output=files` assumes the convenience symlinks are enabled and outputs files with them. It does not take the `--experimental_convenience_symlinks=ignore` option into account.

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

```console
# in the bazel repo, on master (390d212d76e91f413f143b53a997b0bf846c453a)
$ bazel cquery --output=files //examples/cpp:hello-world 2>/dev/null
bazel-out/darwin-fastbuild/bin/examples/cpp/hello-world
# this is expected
$ bazel cquery --experimental_convenience_symlinks=ignore --output=files //examples/cpp:hello-world 2>/dev/null
bazel-out/darwin-fastbuild/bin/examples/cpp/hello-world
# this I would expect to output the output_base instead
```

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

macOS 12.4

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

release 5.3.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 master; git rev-parse HEAD` ?

```text
git@github.com:bazelbuild/bazel.git
390d212d76e91f413f143b53a997b0bf846c453a
390d212d76e91f413f143b53a997b0bf846c453a
```

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

Research direction

Start by reproducing the two bazel cquery --output=files commands from the issue in the Bazel repository, then trace how cquery handles --experimental_convenience_symlinks=ignore. Done means the ignore setting changes the reported paths as described and the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.