You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per Anzu PR 9950, we find the need to set py_binary(*, legacy_create_init=False) as a means to workaround bazelbuild/bazel#7386
From digging a bit more in the Anzu PR and in drake-ros, it seems like it happens because Bazel's imports seem to order things to prefer the external repositories over the user supplied ordering (which seems defective).
$ cd drake_ros_examples
$ bazel run //:drake_ros_py_import_test
...
{source}/test
{runfiles} !!!! This is the shadowing issue
{runfiles}/drake/bindings
... other ros deps
{runfiles}/ros2/archive/rclpy/local/lib/python3.10/dist-packages
{runfiles}/drake_ros !!!! This is shadowed
{runfiles}/drake
{runfiles}/drake_ros_examples
{runfiles}/lcm
{runfiles}/ros2
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/usr/local/lib/python3.10/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.10/dist-packages
While we could sprinkle legacy_create_init=False everywhere, I don't want to require that just yet without having disabled it in Anzu / Drake first, which may take some work.
In Anzu / Drake, we work around things like this by simply renaming the repository.
I will see if we can just rename the repository to drake_ros_repo. Yuck, but whatever, I'd prefer to keep our solutions simple, and I am afraid of interactions with legacy_create_init=False.
The text was updated successfully, but these errors were encountered:
Per Anzu PR 9950, we find the need to set
py_binary(*, legacy_create_init=False)
as a means to workaround bazelbuild/bazel#7386From digging a bit more in the Anzu PR and in
drake-ros
, it seems like it happens because Bazel's imports seem to order things to prefer the external repositories over the user supplied ordering (which seems defective).For example, using 7a36ec3:
While we could sprinkle
legacy_create_init=False
everywhere, I don't want to require that just yet without having disabled it in Anzu / Drake first, which may take some work.In Anzu / Drake, we work around things like this by simply renaming the repository.
I will see if we can just rename the repository to
drake_ros_repo
. Yuck, but whatever, I'd prefer to keep our solutions simple, and I am afraid of interactions withlegacy_create_init=False
.The text was updated successfully, but these errors were encountered: