Difference in build between ament build and ament build --symlink install
Hi, I have an overlay workspace. Once I built it with ament build
and ran the corresponding node, it worked fine.
Then I removed the build and install directory and built it again with ament build --symlink-install
. Now whenever I run the same node there is a Tab and indentation error.
File "/home/aakash/ros2_overlay_ws/build/openadx_demo/openadx_demo/topics/sender.py", line 63
self.pub.publish(msg)
^
TabError: inconsistent use of tabs and spaces in indentation
This shouldnt be the case as I did not edit anything in the source code. What could be the problem ?
The difference between
ament build
andament build --symlink-install
is the fact that in the first case the python file is copied to the install space, in the second case a symbolic link is created. If the file in the source space uses only spaces the problem should not happen.Can you confirm that if you delete the install folder and run
ament build
again (without symlink-install) you can run the node successfully?No, now i cannot run with
ament build
as well. Strange. I already figured out that there wereTabs
in my code but I cannot understand how and why ?it may be due to the editor you are using. Many developers force their text editors to convert all tabs to space automatically to avoid this type of issue.
Can this question be marked as closed as the problem is not due to
ament
or the use of the--symlink-install
flag?