Skip to content

Support package pattern for --deleted_packages#29429

Open
pauldraper wants to merge 1 commit into
bazelbuild:masterfrom
pauldraper:pauldraper/deleted-packages
Open

Support package pattern for --deleted_packages#29429
pauldraper wants to merge 1 commit into
bazelbuild:masterfrom
pauldraper:pauldraper/deleted-packages

Conversation

@pauldraper
Copy link
Copy Markdown
Contributor

@pauldraper pauldraper commented Apr 29, 2026

Description

This allows all BUILD/BUILD.bazel files in a tree to be ignored.

--deleted_packages=third_party/example/...

Motivation

Solves several possible uses.

  1. Handle vendored sources that have non-Bazel BUILD files.
  2. Select all files in an Bazel workspace for an E2E Bazel test, without interference from BUILD in that workspace.
  3. Do "all files" operations, e.g. lint and formatting, by symlinking to the workspace, adding a BUILD with globs to that repo, and ignore package boundaries in that new repo.

While these are possible by explicitly listing individual packages: (1) That requires an extra script/process. (2) The list can get very, very long.

Note: This is different than .bazelignore or REPO.bazel ignore_directories. --deleted_packages still leaves file accessible, albeit without interpreting the packages.

Build API Changes

This change is backwards compatible, and consistent with Bazel package pattern syntax.

Resolves #28844.

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES[NEW]: --deleted_packages accepts a pattern (e.g. example/path/...) that recursively ignores packages.

@pauldraper pauldraper requested a review from a team as a code owner April 29, 2026 20:14
@pauldraper pauldraper requested review from mai93 and removed request for a team April 29, 2026 20:14
@github-actions github-actions Bot added team-Configurability platforms, toolchains, cquery, select(), config transitions team-Core Skyframe, bazel query, BEP, options parsing, bazelrc awaiting-review PR is awaiting review from an assigned reviewer labels Apr 29, 2026
@pauldraper pauldraper force-pushed the pauldraper/deleted-packages branch from 9a81cec to ceacdd1 Compare May 1, 2026 00:14
This allows all BUILD/BUILD.bazel files in a tree to be ignored.
@pauldraper pauldraper force-pushed the pauldraper/deleted-packages branch from ceacdd1 to 226f2ce Compare May 18, 2026 12:48
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-Configurability platforms, toolchains, cquery, select(), config transitions team-Core Skyframe, bazel query, BEP, options parsing, bazelrc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Patterns for --deleted_packages.

1 participant