--incompatible_check_external_repo_source_dir_package_boundary
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### 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 (https://github.com/bazelbuild/bazel/issues/29688). In order to keep this fix backwards compatible, the check was fully disabled for external repos in https://github.com/bazelbuild/bazel/pull/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_
Contributor guide
Assessment
This issue has not been assessed yet.