jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
57 stars 45 forks source link

hpp/idl: remove useless import #561

Closed nim65s closed 1 year ago

nim65s commented 1 year ago

Hi,

Trying to release hpp-corbaserver, I got the following error:

omniidl: Could not import back-end 'omniidl_be_python_with_docstring'
omniidl: Maybe you need to use the -p option?
omniidl: (The error was 'No module named 'omniidl_be.omniidl_be_python_with_docstring'')

I have no idea why, but removing an unused import fixed the issue.

@jmirabel : you added this file in #194, so if you have a better understanding of the issue, or have a better idea, that's welcome. Otherwise, I think this change couldn't harm anyway, so we can just merge this and don't loose any time here.

nim65s commented 1 year ago

Ok, actually, the issue was trivial. On top of "comment" not being needed in hpp/idl/omniidl_be_python_with_docstring.py, it is not provided by omniorbpy 4.2.4, at least from robotpkg "/opt/openrobots/lib/omniidl/omniidl_be/python.py". This is why build was failing for me in the first place.

nim65s commented 1 year ago

Well, flake8 says I'm wrong, and "comment" is used line 115. In other places we have comment = node, should we use this in l.115 too ?

jmirabel commented 1 year ago

I think line 115 has never been executed. I don't think this line works. It should be replaced by something like

print("{node.file()}:{node.line()}: warning: doc ignored")