Skip to content

--incompatible_check_external_repo_source_dir_package_boundary #30041

Description

@fmeum

Motivation

The check that prevents source directories from being allowed to traverse into another package was affected by a bug that made it a no-op in almost all cases in Bazel 9, except for some false positives that were fixed in 9.2.0 (#29688). In order to keep this fix backwards compatible, the check was fully disabled for external repos in #30019. As crossing packages within a source directory can violate visibility constraints and create otherwise impossible combinations of inputs, it is now being enabled as an incompatible change.

Description

When enabled, a source directory in an external repository is no longer allowed to traverse a package boundary, i.e., it must not contain files that lie in a subpackage (a subdirectory with a BUILD file).

Incompatible Flag

--incompatible_check_external_repo_source_dir_package_boundary

Migration Guide

Restructure packages so that source directories do not traverse into subpackages.

In which Bazel LTS version will this incompatible change be enabled?

Bazel 10

Additional Context

No response

TODO List

No response

Metadata

Metadata

Assignees

Labels

incompatible-changeIncompatible/breaking changeuntriagedHas not yet been seen by appropriate subteam

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions