Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

VScode remote development container support #377

Merged
merged 3 commits into from
Aug 28, 2020

Conversation

DrewDevereux
Copy link
Contributor

This pull request adds VScode remote container support.

There's not much to it: just a basic devcontainer.json configuration file, and a couple of paragraphs of documentation.

I also markdownlinted the README.md while I was editing it, I hope that's okay.

It would have been nice if python setup.py build could have been added to the container config as a postCreateCommand, but unfortunately that has proven problematic (when run as a postCreateCommand, it gets stuck in the build-ext stage at subprocess.Popen.)

@ajoubertza
Copy link
Member

Thanks for the VScode addition, @DrewDevereux. Improving the docs is always welcome.

It would have been nice if python setup.py build could have been added to the container config as a postCreateCommand, but unfortunately that has proven problematic (when run as a postCreateCommand, it gets stuck in the build-ext stage at subprocess.Popen.)

Yes, it would be nice if the extension was compiled in the container the first time. The compilation does take around 10 minutes, so was it really stuck, or just churning away in the background?

If we're just changing the Python files, then this would work well. However, if any of the extension C++ code is changed as part of our development, we need to remember to rebuild the extension. I typically have the pytango source on my host, but mounted inside the container. Then the result of a python setup.py build persists when the container is relaunched. At least that's what is happening with PyCharm. I imagine it would be similar with VScode.

@DrewDevereux
Copy link
Contributor Author

I shouldn't have said it "gets stuck": it fails when it reaches that Popen.
Yes, that's how VScode works: the source is on the host, and VScode mounts it, writable, in the container.

Copy link
Member

@ajoubertza ajoubertza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@ajoubertza ajoubertza changed the title VScode remote container support VScode remote development container support Aug 28, 2020
@ajoubertza ajoubertza merged commit dd9530b into tango-controls:develop Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants