Skip to content

[Bazel] Remove implicit __init__.py creation#351

Open
RyanDraves wants to merge 1 commit into
raspberrypi:developfrom
RyanDraves:bazel-2.3.0-fixes
Open

[Bazel] Remove implicit __init__.py creation#351
RyanDraves wants to merge 1 commit into
raspberrypi:developfrom
RyanDraves:bazel-2.3.0-fixes

Conversation

@RyanDraves

Copy link
Copy Markdown

The py_binary targets use implicit __init__.py creation, which on the latest rules_python, causes considerable warning spam:

DEBUG: /private/var/tmp/_bazel_user/86369c54f74076c704937def07bebfcf/external/rules_python+/python/private/py_executable.bzl:1498:14: 
======================================================================
WARNING: Target @@picotool+//bazel:jsonh is using implicit __init__.py creation.
  This diabolic behavior is deprecated and will be disabled by default in a
  future release.
  See https://github.com/bazel-contrib/rules_python/issues/2945

  Ensure all __init__.py files are explicitly created and
  added to the srcs or deps of your targets.

  Disable implicit creation by setting:
    legacy_create_init = 0
  on the target, or globally by setting:
    --incompatible_default_to_explicit_init_py
======================================================================

These flags silence the warning, although I'm not totally certain why it appeared at all. These are standalone scripts that only import from the stdlib.

@github-actions

Copy link
Copy Markdown

Please do not submit against master, use develop instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant