Skip to content

[Bazel] Fix USB dependencies, __init__.py creation - #3098

Merged
kilograham merged 4 commits into
raspberrypi:developfrom
RyanDraves:bazel-2.3.0-patch
Jul 29, 2026
Merged

[Bazel] Fix USB dependencies, __init__.py creation#3098
kilograham merged 4 commits into
raspberrypi:developfrom
RyanDraves:bazel-2.3.0-patch

Conversation

@RyanDraves

Copy link
Copy Markdown

The 2.3.0 release seems to depend on nonexistent target for the USB reset library. A la raspberrypi/picotool#351, new rules_py warnings spam about the py_binary usage in the repo; these changes silence the warning.

I didn't make an issue, sorry for the hygiene.

@lurch lurch added the bazel label Jul 24, 2026
@armandomontanez

Copy link
Copy Markdown
Contributor

Sorry for the silence on this. I think we should definitely fix the dependency issue.

The Python warning is newly introduced in the latest version of rules Python. I think there's a path to rolling that out in a way where rules_python doesn't require this to be set on every py_test and py_bianry. Warnings like this are very noisy, I'll try to spin up a proposed rules_python rollout mechanism today.

If I can't get that out today, I'll approve this as a short-erm workaround. In the interim, I recommend early-adopting --incompatible_default_to_explicit_init_py.

@RyanDraves

Copy link
Copy Markdown
Author

Thanks. I didn't have success with --incompatible_default_to_explicit_init_py with pico-sdk as a dependency, but I'll try and give it another go today as well to see if that silences it. Ironically - very ironically - I also got a ton of warning spam from rules_py's py_binary's involved in the build process. Ugh.

@RyanDraves

Copy link
Copy Markdown
Author

Thanks. I didn't have success with --incompatible_default_to_explicit_init_py with pico-sdk as a dependency, but I'll try and give it another go today as well to see if that silences it. Ironically - very ironically - I also got a ton of warning spam from rules_py's py_binary's involved in the build process. Ugh.

I was mistaken; common --incompatible_default_to_explicit_init_py does indeed silence the warnings. Totally fair to not make the spam your problem if you just want the dependency fix.

@kilograham kilograham added this to the 2.3.1 milestone Jul 27, 2026
@kilograham

Copy link
Copy Markdown
Contributor

I'm going to merge this as is since i'm not sure what common --incompatible_default_to_explicit_init_py means ;-)

feel free to add another PR to fix up

@lurch

lurch commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

The Bazel "buildifier" check is also causing the CI to fail on this PR...

@RyanDraves

Copy link
Copy Markdown
Author

The Bazel "buildifier" check is also causing the CI to fail on this PR...

My bad. Could I interest y'all in a bazel_env setup in another PR?

@kilograham
kilograham merged commit a335eb3 into raspberrypi:develop Jul 29, 2026
7 checks passed
@armandomontanez

Copy link
Copy Markdown
Contributor

Sent out bazel-contrib/rules_python#3997 to hopefully pave a better path for the broader Bazel Python world.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants