Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful error message with circular dependency #229

Closed
DLu opened this issue Oct 21, 2015 · 7 comments
Closed

Unhelpful error message with circular dependency #229

DLu opened this issue Oct 21, 2015 · 7 comments

Comments

@DLu
Copy link
Contributor

DLu commented Oct 21, 2015

If you have a circular dependency, catkin_make outputs a decent error message.

CMake Error at /home/dlu/test_workspace/build/catkin_generated/order_packages.cmake:7 (message):
  Circular dependency in subset of packages:

  docbrown, marty

However, catkin build results in this error:

Found '2' packages in 0.0 seconds. 
[build] Runtime: 0.0 seconds 
Traceback (most recent call last):
  File "/usr/bin/catkin", line 9, in <module>
    load_entry_point('catkin-tools==0.3.0', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 219, in main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 296, in main
    summarize_build=opts.summarize  # Can be True, False, or None
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 601, in     build_isolated_workspace
    packages_to_be_built = topological_order_packages(dict(packages_to_be_built))
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/topological_order.py", line 138, in topological_order_packages
    if package.name in decorators_by_name:
AttributeError: 'str' object has no attribute 'name'
@DLu
Copy link
Contributor Author

DLu commented Oct 21, 2015

@wjwwood
Copy link
Member

wjwwood commented Oct 21, 2015

Looks like the error is coming up from https://github.com/ros-infrastructure/catkin_pkg/blob/master/src/catkin_pkg/topological_order.py#L117 which is in catkin_pkg. It might be that we have to check for circular dependencies before passing to that function or there is a regression in that function. Not sure.

I don't have time right now to dig into it, but I can try to have a look sometime next week.

@IanTheEngineer
Copy link
Contributor

Good find, David. Here's a reproduction of the bug, visualized:

@jbohren
Copy link
Contributor

jbohren commented Jan 20, 2016

This is fixed in #249.

@jbohren jbohren closed this as completed Jan 20, 2016
@DLu
Copy link
Contributor Author

DLu commented Jan 21, 2016

+1

@kopp
Copy link

kopp commented Sep 9, 2016

I get the following error with catkin 0.4.2 (Ubuntu 14.04) with circular dependencies (a depends on b, b depends on a):

[build] Found '2' packages in 0.0 seconds.                                                                                                                                                                                                                                                                                 
Traceback (most recent call last):
  File "/usr/bin/catkin", line 9, in <module>
    load_entry_point('catkin-tools==0.4.2', 'console_scripts', 'catkin')()
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 258, in main
    catkin_main(sysargs)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/commands/catkin.py", line 253, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/cli.py", line 418, in main
    summarize_build=opts.summarize  # Can be True, False, or None
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 305, in build_isolated_workspace
    packages, context, workspace_packages)
  File "/usr/lib/python2.7/dist-packages/catkin_tools/verbs/catkin_build/build.py", line 98, in determine_packages_to_be_built
    workspace_package_names = dict([(pkg.name, (path, pkg)) for path, pkg in ordered_packages])
AttributeError: 'str' object has no attribute 'name'

This looks slightly different and as far as I understood the bug above is fixed in 0.4.x -- right? So I'm not sure whether this is something new...

@timotheecour
Copy link
Contributor

reopened here since found same issue: #430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants