bazelbuild / bazelbuild/bazel

Relaxing scope rules for genquery()

Open
#22,244 8 comments 0 reactions 0 assignees View on GitHub
team-Core type: feature request untriaged
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the feature request:

Relax the requirement for scopes in some cases, for instance, if we only care about packages.

### Which category does this issue belong to?

Rules API

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

Ability to simulate the command: `bazel query "//...:all" --output package`
I did test that locally in my machine (removing all the scope checks) and it worked without any problem.
```
genquery(
name = "genquery",
expression = "//services/...:all",
opts = [
"--output=package",
],
scope = ["all"],
strict = False,
)
```

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

Microsoft Windows [Version 10.0.26200.5001]

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

7.1.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` ?

_No response_

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

No

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

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the genquery() scope validation and compare its behavior with the stated bazel query "//...:all" --output package example. Done means package output can be generated without requiring irrelevant scopes, while preserving appropriate validation for other outputs.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
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.