Skip to content

Add --null to aquery and cquery.#28983

Open
jeanralphaviles wants to merge 1 commit intobazelbuild:masterfrom
jeanralphaviles:null
Open

Add --null to aquery and cquery.#28983
jeanralphaviles wants to merge 1 commit intobazelbuild:masterfrom
jeanralphaviles:null

Conversation

@jeanralphaviles
Copy link
Copy Markdown

Description

The bazel query command supports a --null flag which expands out to --line_terminator_null=true.

This feature is useful for piping the output of the query command. The \0 (NUL) character is useful to unambiguously separate the output. Other tools such as GNU parallel, xargs, find, grep, etc... support separating input/output with NUL characters.

For all the reasons that the --null flag is useful for query, it should be added to aquery and cquery as well for consistency. They already support the --line_terminator_null flag anyway.

Motivation

There is an inconsistency in between query, aquery, and cquery commands. It would be nice for all query commands to support the same flag.

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
    • I didn't see any existing test cases for the --null flag in query. So I haven't added any new ones.
  • I have updated the documentation (if applicable).
    • Not sure if I need to update the .mdx files or if they're autogenerated.

Release Notes

RELNOTES[NEW]: bazel aquery/cquery now support the --null flag from the query command.

@github-actions github-actions Bot added team-Performance Issues for Performance teams awaiting-review PR is awaiting review from an assigned reviewer labels Mar 13, 2026
Closes bazelbuild#28982.

RELNOTES: bazel aquery/cquery now support the `--null` flag from the query command.
@jeanralphaviles
Copy link
Copy Markdown
Author

@bazelbuild/triage per https://bazel.build/contribute/patch-acceptance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review PR is awaiting review from an assigned reviewer team-Performance Issues for Performance teams

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant