-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incompatible_disallow_load_labels_to_cross_package_boundaries: make 'load' statement respect package boundaries #6408
Comments
…ndary. This behavior is guarded by a flag (default value is "don't error out"), and will eventually become the only behavior. This implements the feature in #6408. RELNOTES: None PiperOrigin-RevId: 217402217
This is a breaking change, right? Which flag guards it? How do users migrate? |
Yes, it's a breaking change. We need tooling to help the migration (cc @vladmos). |
What is missing for migration: migration docs, length of migration window. After these are done, please add "migration-ready" label. |
Migration notes This will fail when a label crosses packages, i.e. when the position of the colon is not correct in a label. The error message will tell you what is the correct label to use instead. Read more about the label syntax here: https://docs.bazel.build/versions/master/build-ref.html#labels |
Downstream projects that fail with this flag (https://buildkite.com/bazel/bazel-at-release-plus-incompatible-flags/builds/56):
|
This flag was not flipped in time for the Bazel 0.23.0 release and will thus be postponed to Bazel 0.24.0. |
This issue was tagged as "breaking-change-0.24" but does not appear ready to be flipped in the 0.24.0 release. If this is incorrect please comment on that issue and discuss with me. |
After flipping of --incompatible_disallow_load_labels_to_cross_package_boundaries bit in Bazel: [1], currently documented way to import external dependencies from plugins that implement standalone build mode doesn't work any more. This change documents an alternative approach how to make it work, without abandoning of standalone build mode. [1] bazelbuild/bazel#6408 Bug: Issue 10885 Change-Id: I7b1c4e9fa4f6ba8966efcde4cdee7d76d6f59d1c
Description of the problem / feature request:
load('//a:b/c.bzl', 'doesntmatter')
currently checks that '//a' is a package but doesn't check that '//a/b' is not.Feature requests: what underlying problem are you trying to solve with this feature?
we currently have a "label crosses subpackage boundary check" elsewhere (e.g. for target names inside of a package). so we should add this for the sake of consistency.
Any other information, logs, or outputs that you want to share?
we should piggyback/unify the existing mechanism for the existing "label crosses subpackage boundary check" in PackageFunction.java.
The text was updated successfully, but these errors were encountered: