microsoft / microsoft/vscode-remote-release

devcontainer.json shows Warning/Problem for extension entry using a filepath

Open
#8,827 2 comments 3 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Aug 29, 2023.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.81.0, 1.82.0-insider
  • Local OS Version: Windows 10
  • Remote OS Version: N/A
  • Remote Extension/Connection Type: Happens locally with no extensions installed. Even though this happens with no extensions installed, I logged it here because it's related to the devcontainer.json file format.

Steps to Reproduce:

  1. Make a simple devcontainer.json file like this
{
    "name": "MyDevContainer",
    "image": "ubuntu:20.04",

    "customizations": {
		"vscode": {
            "extensions": [
                "ms-vscode.cpptools",
                "/extensions/redhat.java-0.82.0.vsix"
            ]
        }
    }
}
  1. This shows a Problem with the "/extensions/redhat.java-0.82.0.vsix" line and the following text: Expected format: '${publisher}.${name}' or '${publisher}.${name}@${version}'. Example: 'ms-dotnettools.csharp'.
  2. This does install the extension via the filesystem path.

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

Additional Notes:

  1. See this comment that documents the format: https://github.com/microsoft/vscode-dev-containers/issues/1572#issuecomment-1209977897
  2. My Use Case:
    a. I'm using devcontainers for our development environment, and I want to ensure that one of our custom extensions is installed for developers automatically, like the extensions that are available on the marketplace (ms-vscode.cpptools).
    b. If there's an easier way to ensure that a custom extension is installed inside the container automatically, that would work for me too (and make this issue N/A for me)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.