mvukov / rules_ros

Build ROS (1) with Bazel
Apache License 2.0
24 stars 12 forks source link

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

Closed hofbi closed 4 months ago

hofbi commented 6 months 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 6 months ago

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

hofbi commented 6 months 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.

mvukov commented 4 months ago

Fixed via https://github.com/mvukov/rules_ros/pull/20.

hofbi commented 4 months ago

20 did not yet fix it. I will update to the bzlmod on Monday and let you know if #13 fixed it.