bazelbuild / bazelbuild/bazelisk

CLI completion or short names for bazel targets

Open
#671 7 comments 0 reactions 0 assignees View on GitHub
P2 type: feature request
Dominant language
Go
Stars
2.7k
Forks
424
PR merge metrics
No merged PRs in 30d

Description

### Description of the feature request:

Our users are asking for easier ways to enter target names for a given build. They don't like having to type the full path to each target. One option is for us to programatically generate a list of top-level aliases - one for every binary (around 7000 in our large repo) in a bzl file and load that into top level BUILD.bazel. Another is to implement a bazel query that generates a shell completion config file.

Our binary target names are unique.

Does anyone have any experience with either of these approaches? Is there any prior art out there that we can reuse?

For target //src/very/long/path/to/target/sometimes/even/longer:libMySharedLibrary

Option1: bazel build //:libMySharedLibrary
Option2: bazel build //src/very/long -> full target name

Thanks!

### Which category does this issue belong to?

CLI

### What underlying problem are you trying to solve with this feature?

_No response_

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

Windows

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

8.0.1

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

```text

```

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

The issue names no source files, tests, or implementation entry point. Compare the proposed top-level aliases and generated shell-completion configuration for Bazel targets on Windows, then determine which direction is wanted. Done means users can invoke a uniquely named binary target without typing its full path.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.