mvukov / rules_ros

Build ROS (1) with Bazel
Apache License 2.0
21 stars 9 forks source link

'ros_comm//:rospy' and 'ros_ros//:rosunit' does not have mandatory providers: 'PyInfo' or 'PyVirtualInfo' #17

Open hofbi opened 1 month ago

hofbi commented 1 month ago

Since https://github.com/aspect-build/rules_py/pull/311 was merged, I get the following error in my code when updating to a version that contains this PR

... in deps attribute of py_library rule FOO: ros_comm//:rospy' does not have mandatory providers: 'PyInfo' or 'PyVirtualInfo'. Since this rule was created by the macro 'py_library', the error might have been caused by the macro implementation

So far, I already checked the entire code for some hint on where the native/Java implementation of py_library could be used but was not able to find any. Any idea what could cause this issue?

mvukov commented 1 month ago

Nothing too obvious. I'll have to dig deeper into this.

hofbi commented 1 month ago

I checked with bazel cquery @ros_comm//:rospy --output=starlark --starlark:expr='providers(target).keys()' and got

["LicenseInfo", "@@rules_python//python/private/common:providers.bzl%PyInfo", "@@_builtins//:common/python/providers.bzl%PyInfo", "InstrumentedFilesInfo", "@@rules_python//python/private/common:providers.bzl%PyCcLinkParamsProvider", "FileProvider", "FilesToRunProvider", "OutputGroupInfo"]

For bazel cquery @ros_ros//:rosunit --output=starlark --starlark:expr='providers(target).keys()' I got

["LicenseInfo", "@@rules_python//python/private/common:providers.bzl%PyInfo", "@@_builtins//:common/python/providers.bzl%PyInfo", "InstrumentedFilesInfo", "@@rules_python//python/private/common:providers.bzl%PyCcLinkParamsProvider", "FileProvider", "FilesToRunProvider", "OutputGroupInfo"]

So both seem to have the PyInfo provider.