microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 276 forks source link

Cannot install extensions that has dependency #7347

Closed djpremier closed 1 year ago

djpremier commented 1 year ago

The container cannot activate/install an extension if it depends on another one.

Cannot activate the 'EXTENSION_NAME' extension because it depends on the 'PARENT_EXTENSION_NAME' extension, which is not installed. Would you like to install the extension and reload the window?

Examples: Brazilian Portuguese - Code Spell Checker depends on Code Spell Checker image

SQLTools PostgreSQL/Cockroach/Redshift Driver depends on SQLTools image

Steps to Reproduce:

  1. Add extensions on devcontainer.json that has dependency
  2. Run container

devcontainer.json

// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
{
  "name": "App Development",
  "dockerComposeFile": [
    "../docker-compose.yml",
    "../docker-compose.override.yml"
  ],
  "overrideCommand": true,
  "shutdownAction": "stopCompose",
  "remoteUser": "vscode",
  "service": "web",
  "workspaceFolder": "/app",
  // "forwardPorts": [80],
  // Set *default* container specific settings.json values on container create.
  "settings": {
    "extensions.ignoreRecommendations": true,
    "remote.SSH.showLoginTerminal": true,
    "search.exclude": {
      "**/.yarn": true,
      "**/.pnp.*": true,
      "**/public": true,
      "**/node_modules": true,
      "**/docker": true
    },
    "editor.formatOnPaste": false,
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "files.eol": "\n",
    "files.trimTrailingWhitespace": true,
    "terminal.integrated.defaultProfile.linux": "ash",
    "[ruby]": {
      "editor.detectIndentation": false,
      "editor.insertSpaces": true,
      "editor.tabSize": 2,
      // "editor.defaultFormatter": "rebornix.ruby",
      "editor.defaultFormatter": "castwide.solargraph",
      "editor.formatOnSave": true
    },
    "[erb]": {
      "editor.defaultFormatter": "manuelpuyol.erb-linter",
      "editor.formatOnSave": true
    },
    "files.associations": {
      "*.html.erb": "erb",
      "**/azure-pipelines.yml": "azure-pipelines",
      "docker-compose.*.yml": "dockercompose"
    },
    "emmet.includeLanguages": {
      "erb": "html"
    },
    "emmet.showAbbreviationSuggestions": true,
    "emmet.showSuggestionsAsSnippets": true,
    "erb.erb-lint.configFilePath": "/app/mainapp/.erb-lint.yml",
    "solargraph.autoformat": true,
    "solargraph.completion": true,
    "solargraph.definitions": true,
    "solargraph.diagnostics": true,
    "solargraph.formatting": true,
    "solargraph.hover": true,
    "solargraph.references": true,
    "solargraph.useBundler": true,
    "solargraph.symbols": true,
    "solargraph.rename": true,
    "solargraph.logLevel": "debug",
    "ruby.useBundler": true,
    "ruby.useLanguageServer": true,
    "ruby.lint": {
      "rubocop": {
        "useBundler": true // enable rubocop via bundler
      }
    },
    "ruby.format": "rubocop",
    "ruby.codeCompletion": "rcodetools",
    "ruby.intellisense": "rubyLocate",
    "ruby.rubocop.onSave": true,
    "ruby.rubocop.useBundler": true,
    "sqltools.connections": [
      {
        "name": "Rails Development Database",
        "driver": "PostgreSQL",
        "previewLimit": 50,
        "server": "postgres",
        "port": 5432,
        "database": "db",
        "username": "user",
        "password": "SecretPassword"
      },
      {
        "name": "Rails Test Database",
        "driver": "PostgreSQL",
        "previewLimit": 50,
        "server": "postgres",
        "port": 5432,
        "database": "db_test",
        "username": "user",
        "password": "SecretPassword"
      }
    ],
    "material-icon-theme.files.associations": {
      "docker-compose.devcontainer.yml": "docker",
      "docker-compose.sonar-scanner.yml": "docker",
      ".solargraph.yml": "rubocop"
    },
    "cSpell.language": "en,pt-BR",
    "cSpell.enableFiletypes": [
      "dockerfile",
      "erb",
      "gemfile",
      "haml",
      "ignore",
      "ini",
      "ruby",
      "makefile",
      "shellscript"
    ],
    "cSpell.words": [
      "Aceitos",
      "CNPJ",
      "contato",
      "Criticidade",
      "Customizada",
      "Detalhamento",
      "Faturamento",
      "filterrific",
      "incoterm",
      "Incoterms",
      "mainapp",
      "mkdir",
      "PSQL",
      "Sidekiq",
      "WORKDIR"
    ]
  },
  // Add the IDs of extensions you want installed when the container is created.
  "extensions": [
    "rebornix.ruby",
    "castwide.solargraph",
    "misogi.ruby-rubocop",
    "groksrc.ruby",
    "vayan.haml",
    "vortizhe.simple-ruby-erb",
    "hoovercj.ruby-linter",
    "miguel-savignano.ruby-symbols",
    "bung87.rails",
    "mtxr.sqltools",
    "mtxr.sqltools-driver-pg",
    "eamodio.gitlens",
    "donjayamanne.githistory",
    "mhutchie.git-graph",
    "editorconfig.editorconfig",
    "wingrunr21.vscode-ruby",
    "seatonjiang.gitmoji-vscode",
    "streetsidesoftware.code-spell-checker",
    "streetsidesoftware.code-spell-checker-portuguese-brazilian",
    "yzhang.markdown-all-in-one",
    "KoichiSasada.vscode-rdbg",
    "manuelpuyol.erb-linter"
  ]
}
dlastrazeneca commented 1 year ago

I see that if I try to install "ms-python.python" and "ms-python.black-formatter" I have the same problem. Black depends on python, but python is installed after black.

I think this is because the extensions are installed in alphabetical order. Is there a way to specify the order explicitly? I have not found it yet.

sandy081 commented 1 year ago

/duplicate

https://github.com/microsoft/vscode/issues/149309

VSCodeTriageBot commented 1 year ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!