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

mount workspace & better python linting #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tgoelles
Copy link

The changes allow to use pylint and auto completion with Python correctly. In addition the workspace is mounted so files can be easily accessed with the host system and are persistent.

@yosuke
Copy link
Member

yosuke commented May 21, 2020

Hi,
Thank you for the pull request.
Enable linting by default is nice.

Can you consider following two points?

  1. ROS distribution "kinetic" is hardcoded in the setting

We have melodic and dashing distribution as well in this project:
https://hub.docker.com/r/devrt/ros-devcontainer-vscode/tags

Hardcoding to "kinetic" is not convenient at this point.
PYTHONPATH is already set in entrypoint script, so we do not have to set in the vscode side.
Completion should without "python.autoComplete.extraPaths" setting, since vscode will read it from PYTHONPATH.
So we probably don't need them.
Can you delete these settings and check how it works?

  1. Binding workspace to host is slow

We first tried to mount workspace to the host, but it turns out to be very slow in many platforms:
docker/for-mac#3677
docker/for-win#188
It is OK, when we only edit python scripts, but it is really slow if we compile C++ modules even if we set "cache" option.

Currently, we use mutagen (see https://mutagen.io/ ) to sync workspace folder to the host.
mutagen sync can be started by using following script:
https://github.com/devrt/ros-devcontainer-vscode/blob/master/start-mutagen.sh

Can you try this and let me know your opinion?

@tgoelles
Copy link
Author

tgoelles commented Jun 2, 2020

Hi,

1.) yes the hardcoded part is a valid point. I will look into it.
The vs code way does not use the entrypoint script, so code completion did not work that way.
2.) I don't think its very slow on my windows workcomputer, but I will try it out.
I should have time in the next days to take check mutagen out and compare it to the native VS code way.

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

Successfully merging this pull request may close these issues.

2 participants