Open cmuell89 opened 4 years ago
Could be related to: https://github.com/microsoft/vscode-python/issues/13357
Many users of ROS still use Python 2.7. Pylance Language Server does not support Python 2.7 syntax and the linking and path updates inside the init.py of your built ROS packages in devel/lib/python2.7/dist-packages directory fails to parse correctly.
I think it would be worth documenting this. Switching to Jedi language server works correctly.
How did you fix it?
In Settings (UI) i have set the language server to Jedi. Thats it? Doesnt work for me.
Yea Jedi seems to work for me out of the box. Not sure what else to recommend.
general information Linux Mint 19.3 ROS Melodic ROS Extension v0.6.4
what is the bug None of my locally developed ROS Python packages built using catkin_make/catkin build are successfully resolved as imports despite the inclusion of python.autoComplete.extraPaths field in settings.json.
expected behavior I would hope to have my local ROS packages incorporated into the import tree for happy development.
additional context
Tested with jedi, Microsoft, and Pylance Language Servers. It appears that imports are working correctly with the jedi language server, but I know that VSCode has moved onto the Pylance Language Server.
The update path commands seem to be updateding my settings.json and c_cpp_properties.json correctly files within the .vscode directory. I have it setup such that .vscode exists at the sample level of src/ in my catkin workspace.
settings.json