Skip to content

problem adding pre-release version of extension to devcontainer.json  #149383

Description

@tomcperry

This might be the wrong place to ask about this, as it might be a general vscode issue/question, but is it possible to automatically install the black formatter (pre-release) extension inside a devcontainer?
I am able to install manually after my devcontainer starts up, but when I include it in my devcontainer.json so that it is installed automatically on start up, it fails to install.

My guess is that it is because it is only available as a pre-release right now. But is there anyway to force the devcontainer to install the pre-release version?

I initially tried the following in my devcontainer.json:

"extensions": [
   "ms-python.python",
   "ms-python.black-formatter"
]

The python extension installs fine, but the black formatter did not.

I then tried to see if I could explictly force a version, but that did not work either:

"extensions": [
   "ms-python.python",
   "ms-python.black-formatter@2022.1.11291006"
]

Any ideas? Or is this just not supported?

In case it is interesting, this is logs from the container starting that shows the extension is recognised from the devcontainer.json file, but there seems to to be no attempt to install it...

[20449 ms] Installing extension 'ms-python.black-formatter'...
[20510 ms] Installing extension 'ms-python.python'...
[20514 ms] [13:18:27] Getting Manifest... ms-python.python
[20589 ms] [13:18:27] Installing extension: ms-python.python
[21469 ms] [13:18:28] Getting Manifest... ms-toolsai.jupyter
[21810 ms] [13:18:28] [127.0.0.1][d62eab34][ExtensionHostConnection] New connection established.
[21828 ms] [13:18:28] [127.0.0.1][d62eab34][ExtensionHostConnection] <286> Launched Extension Host Process.
[21892 ms] [13:18:28] Getting Manifest... ms-toolsai.jupyter-keymap
[22478 ms] [13:18:29] Getting Manifest... ms-toolsai.jupyter-renderers
[22627 ms] [13:18:29] Getting Manifest... ms-python.vscode-pylance
[22936 ms] [13:18:29] Installing extension: ms-toolsai.jupyter
[13:18:29] Installing extension: ms-toolsai.jupyter-keymap
[13:18:29] Installing extension: ms-toolsai.jupyter-renderers
[13:18:29] Installing extension: ms-python.vscode-pylance
[23716 ms] [13:18:30] Downloaded extension: ms-python.python /home/vscode/.vscode-server/extensionsCache/ms-python.python-2022.6.1
[13:18:30] Downloaded extension: ms-toolsai.jupyter /home/vscode/.vscode-server/extensionsCache/ms-toolsai.jupyter-2022.4.1011282140
[13:18:30] Downloaded extension: ms-toolsai.jupyter-keymap /home/vscode/.vscode-server/extensionsCache/ms-toolsai.jupyter-keymap-1.0.0
[23719 ms] [13:18:30] Downloaded extension: ms-toolsai.jupyter-renderers /home/vscode/.vscode-server/extensionsCache/ms-toolsai.jupyter-renderers-1.0.6
[24167 ms] [13:18:30] Extracted extension to /home/vscode/.vscode-server/extensions/.82e2c3bb-591a-4bb8-872e-74b0ed835b83: ms-toolsai.jupyter-keymap
[24203 ms] [13:18:30] Renamed to /home/vscode/.vscode-server/extensions/ms-toolsai.jupyter-keymap-1.0.0
[24247 ms] [13:18:30] Extracting completed. ms-toolsai.jupyter-keymap
[26653 ms] [13:18:33] Extracted extension to /home/vscode/.vscode-server/extensions/.8c8e8857-c23f-4e46-90c5-a020846262f4: ms-toolsai.jupyter-renderers
[26664 ms] [13:18:33] Renamed to /home/vscode/.vscode-server/extensions/ms-toolsai.jupyter-renderers-1.0.6
[26674 ms] [13:18:33] Extracting completed. ms-toolsai.jupyter-renderers
[29076 ms] [13:18:35] Extracted extension to /home/vscode/.vscode-server/extensions/.8583f50a-ecbe-41e8-8f36-10e2900dc868: ms-toolsai.jupyter
[29087 ms] [13:18:35] Renamed to /home/vscode/.vscode-server/extensions/ms-toolsai.jupyter-2022.4.1011282140
[29139 ms] [13:18:35] Extracting completed. ms-toolsai.jupyter
[33495 ms] [13:18:40] Extracted extension to /home/vscode/.vscode-server/extensions/.0efb701e-690f-48ce-9e07-edafa13699b7: ms-python.python
[33518 ms] [13:18:40] Renamed to /home/vscode/.vscode-server/extensions/ms-python.python-2022.6.1
[33525 ms] [13:18:40] Extracting completed. ms-python.python
[33709 ms] [13:18:40] Downloaded extension: ms-python.vscode-pylance /home/vscode/.vscode-server/extensionsCache/ms-python.vscode-pylance-2022.5.1
[43686 ms] [13:18:50] Extracted extension to /home/vscode/.vscode-server/extensions/.1090f1a7-105c-4887-acc4-6cddf87127c8: ms-python.vscode-pylance
[43694 ms] [13:18:50] Renamed to /home/vscode/.vscode-server/extensions/ms-python.vscode-pylance-2022.5.1
[43701 ms] [13:18:50] Extracting completed. ms-python.vscode-pylance
[43703 ms] [13:18:50] Extension installed successfully: ms-toolsai.jupyter-keymap
[13:18:50] Extension installed successfully: ms-toolsai.jupyter-renderers
[13:18:50] Extension installed successfully: ms-toolsai.jupyter
[13:18:50] Extension installed successfully: ms-python.python
[13:18:50] Extension installed successfully: ms-python.vscode-pylance
[43717 ms] Extension 'ms-python.python' v2022.6.1 was successfully installed.

Activity

  1. karthiknadig commented on May 12, 2022

    @karthiknadig
    Member

    Moving this to VS Code, someone there should be able to answer this.

  2. sandy081 commented on May 19, 2022

    @sandy081
    Member

    You can add pre-release as follows: ms-python.black-formatter@prerelease

  3. locked and limited conversation to collaborators on Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions