Closed f-fl0 closed 3 years ago
While considering more attributes than name
is certainly the right thing to do I am concerned about including evaluated_condition
(see https://github.com/ros-infrastructure/catkin_pkg/blob/e7a6806b370c9318ce8a792149c8906830ba22e6/src/catkin_pkg/package.py#L324) in this comparison. Both instances could have the same attributes and only that computed attribute could be different, I would think that those should still be considered duplicates. Maybe the right thing to do would be to exclude evaluated_condition
from __eq__
?
While considering more attributes than
name
is certainly the right thing to do I am concerned about includingevaluated_condition
(seehttps://github.com/ros-infrastructure/catkin_pkg/blob/e7a6806b370c9318ce8a792149c8906830ba22e6/src/catkin_pkg/package.py#L324 ) in this comparison. Both instances could have the same attributes and only that computed attribute could be different, I would think that those should still be considered duplicates. Maybe the right thing to do would be to exclude
evaluated_condition
from__eq__
?
@dirk-thomas __eq__
now ignores evaluated_condition
as you suggested. Let me know if you have other comments.
Thanks for the patch.
Problem statement
Running
catkin_make
in a workspace with a package with dependencies like this:will result in the following error:
Proposed solution
Comparing dependencies using their names and attributes (e.g. conditions) instead of just their names.