colcon / colcon-cmake

Extension for colcon to support CMake packages
http://colcon.readthedocs.io
Apache License 2.0
16 stars 25 forks source link

Compile error on a clean Windows 10 ROS2 install, line 103 of build.py, rc is of type int #35

Closed MatteoRagni closed 5 years ago

MatteoRagni commented 5 years ago

I'm testing on a clean Windows 10 install of ROS2 with Visual Studio 2017 15.9.7 and python 3.7.2, and building the demo_nodes_cpp fails with the following error:

Traceback (most recent call last):
  File "c:\python37\lib\site-packages\colcon_core\executor\__init__.py", line 91, in __call__
    rc = await self.task(*args, **kwargs)
  File "c:\python37\lib\site-packages\colcon_core\task\__init__.py", line 92, in __call__
    return await task_method(*args, **kwargs)
  File "c:\python37\lib\site-packages\colcon_ros\task\ament_cmake\build.py", line 72, in build
    additional_hooks=additional_hooks)
  File "c:\python37\lib\site-packages\colcon_cmake\task\cmake\build.py", line 103, in build
    if rc and rc.returncode:
AttributeError: 'int' object has no attribute 'returncode'

Actually the _build function is a little strange for me, since it may have an unclear return value (the only return is inside an if, inside a loop), and the receiving function (build) makes no type check.

Do you have any idea why build is receiving an int instead of a subprocess.CompletedProcess?

MatteoRagni commented 5 years ago

Tested again on a new install, with no problem, but python version 3.7.1

dirk-thomas commented 5 years ago

I think the problem you describe has already been fixed in #33. Please make sure that you are using at least version 0.2.8 of this package.

If updating the package fixes the problem please go ahead and close the ticket.

MatteoRagni commented 5 years ago

@dirk-thomas It is possible to change the title of #33 in order to make it more easy to find?

MatteoRagni commented 5 years ago

Yes, the system with the error had the version 0.2.7 installed. The upgrade fixed the error.

dirk-thomas commented 5 years ago

It is possible to change the title of #33 in order to make it more easy to find?

Yes, editing GitHub ticket titles is possible. Please comment on the ticket in question with a proposal for an updated title / description.