-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Empty __init__.py
files are being generated for repo root and runfiles root
#7653
Comments
Note, however, that targets that have been getting away with not declaring a dependency on the top-level init file will likely break when |
I think relates #3998 (for remote repos)? (along the lines of |
They're both import-related, but that bug's about name clashes between multiple things on the |
FTR, here's a doc link for current version of Bazel (3.1.0): In those docs, there's the flag As a small related note, without control over how the runfiles tree is generated, it may be impossible to do things like workaround #4594 for Python, where the implicit module allows on to do a hack like EDIT: I lied. The above Python workaround can be done using |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
This happens only for targets that are referenced by their full repo name, i.e.
@//foo:bar
or//foo:bar
. This probably includes all external repo targets (though I have not tested that), and main repo targets when the main repo's full name is not used and when--incompatible_remap_main_repo
is false.See here for a more detailed explanation.
The effect of this bug is that some targets have been able to get away with omitting a dependency on the top-level
__init__.py
file of their repo, provided that thelegacy_create_init
attribute is true (default). Fixing this bug may break these targets.It's also questionable whether we should bother fixing this behavior at all, or just go ahead and deprecate automatic init creation.
The text was updated successfully, but these errors were encountered: