Skip to content

activation: extension sometimes gets activated for a workspace without any go code  #1894

@hyangah

Description

@hyangah

Reported externally.

It happens when I re-start VSCode, because the check whether go files exist (recursively) times out

Go extension activated on three of them (the fourth was a flat folder, pretty much), Dart on two of them (checks up to four-deep, instead of **/). Those were the only two that activated because of that timeout.

Relevant upstream issue - microsoft/vscode#73656

The python extension had "contains **/*.py" ahead ago and after receiving multiple complaints, they only have "onlanguage" (which causes confusion among students). Eventually, I found out that their workaround was to look for an empty file ("mspythonconfig.yaml" or sth -- confusing name, don't think it serves any other purpose) in root folder only..

[2021-11-15 10:56:42.759] [exthost] [info] Extension host with pid 828056 started
[2021-11-15 10:56:42.760] [exthost] [info] Skipping acquiring lock for /home/user/.config/Code/User/workspaceStorage/4bd77312219e9d8f35e159b7431dfc25.
[2021-11-15 10:56:43.909] [exthost] [info] ExtensionService#_doActivateExtension vscode.microsoft-authentication, startup: false, activationEvent: 'onAuthenticationRequest:microsoft'
[2021-11-15 10:56:43.969] [exthost] [info] ExtensionService#_doActivateExtension polymer.polymer-ide, startup: false, activationEvent: 'onLanguage:plaintext'
[2021-11-15 10:56:44.017] [exthost] [info] ExtensionService#_doActivateExtension ms-python.python, startup: false, activationEvent: 'onLanguage:python', root cause: ms-python.vscode-pylance
[2021-11-15 10:56:44.969] [exthost] [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter, startup: false, activationEvent: 'onLanguage:python'
[2021-11-15 10:56:46.146] [exthost] [info] ExtensionService#_doActivateExtension njpwerner.autodocstring, startup: false, activationEvent: 'onLanguage:python'
[2021-11-15 10:56:46.246] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.274] [exthost] [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*', root cause: vscode.github
[2021-11-15 10:56:46.506] [exthost] [info] ExtensionService#_doActivateExtension bierner.emojisense, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.566] [exthost] [info] ExtensionService#_doActivateExtension christian-kohler.path-intellisense, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.643] [exthost] [info] ExtensionService#_doActivateExtension ecmel.vscode-html-css, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.775] [exthost] [info] ExtensionService#_doActivateExtension EditorConfig.EditorConfig, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.839] [exthost] [info] ExtensionService#_doActivateExtension Equinusocio.vsc-material-theme, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.870] [exthost] [info] ExtensionService#_doActivateExtension equinusocio.vsc-material-theme-icons, startup: true, activationEvent: '*'
[2021-11-15 10:56:46.897] [exthost] [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: true, activationEvent: '*'
[2021-11-15 10:56:47.188] [exthost] [info] ExtensionService#_doActivateExtension HookyQR.beautify, startup: true, activationEvent: '*'
[2021-11-15 10:56:47.297] [exthost] [info] ExtensionService#_doActivateExtension lostintangent.wikilens, startup: true, activationEvent: '*'
[2021-11-15 10:56:47.454] [exthost] [info] ExtensionService#_doActivateExtension ms-vsliveshare.vsliveshare, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.314] [exthost] [info] ExtensionService#_doActivateExtension oderwat.indent-rainbow, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.324] [exthost] [info] ExtensionService#_doActivateExtension PKief.material-icon-theme, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.381] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.cpptools, startup: true, activationEvent: '*', root cause: platformio.platformio-ide
[2021-11-15 10:56:49.600] [exthost] [info] ExtensionService#_doActivateExtension rusnasonov.vscode-hugo, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.755] [exthost] [info] ExtensionService#_doActivateExtension stkb.rewrap, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.832] [exthost] [info] ExtensionService#_doActivateExtension vscode-icons-team.vscode-icons, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.962] [exthost] [info] ExtensionService#_doActivateExtension vsls-contrib.codetour, startup: true, activationEvent: '*'
[2021-11-15 10:56:49.996] [exthost] [info] ExtensionService#_doActivateExtension vsls-contrib.gistfs, startup: true, activationEvent: '*'
[2021-11-15 10:56:50.104] [exthost] [info] ExtensionService#_doActivateExtension vsls-contrib.gitdoc, startup: true, activationEvent: '*'
[2021-11-15 10:56:50.894] [exthost] [info] ExtensionService#_doActivateExtension Dart-Code.dart-code, startup: true, activationEvent: 'workspaceContainsTimeout:*/pubspec.yaml,*/*/pubspec.yaml,*.dart,*/*.dart,*/*/*.dart'
[2021-11-15 10:56:51.212] [exthost] [info] ExtensionService#_doActivateExtension golang.go, startup: true, activationEvent: 'workspaceContainsTimeout:**/*.go'
[2021-11-15 10:56:53.209] [exthost] [info] ExtensionService#_doActivateExtension codespaces-contrib.codeswing, startup: false, activationEvent: 'api', root cause: vsls-contrib.gistfs
[2021-11-15 10:56:55.758] [exthost] [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
[2021-11-15 10:56:56.959] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
[2021-11-15 10:56:56.965] [exthost] [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished'
[2021-11-15 10:56:57.142] [exthost] [info] ExtensionService#_doActivateExtension eamodio.gitlens, startup: false, activationEvent: 'onStartupFinished'
[2021-11-15 10:56:57.747] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-containers, startup: false, activationEvent: 'onStartupFinished'
[2021-11-15 10:56:58.039] [exthost] [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
[2021-11-15 10:56:58.047] [exthost] [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
[2021-11-15 10:56:58.269] [exthost] [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
[2021-11-15 10:56:58.503] [exthost] [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter-renderers, startup: false, activationEvent: 'api', root cause: ms-toolsai.jupyter
[2021-11-15 10:57:00.055] [exthost] [info] ExtensionService#_doActivateExtension ms-python.vscode-pylance, startup: false, activationEvent: 'onLanguage:python'
[2021-11-15 10:57:22.264] [exthost] [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
[2021-11-15 10:57:22.277] [exthost] [info] ExtensionService#_doActivateExtension platformio.platformio-ide, startup: true, activationEvent: '*'
[2021-11-15 10:57:22.649] [exthost] [info] Eager extensions activated

Looking into the history of the Go extension, I found this rule was added by microsoft/vscode-go#2859 to address microsoft/vscode-go#2821

  • User-visible impact

    • gopls is getting activated and starts scanning the folders. Not sure whether the gopls will complain or not.
    • unnecessary UI components popping up: welcome page, go status bar items.
    • nagging popups for tool installation
  • Internal impact

    • spurious gopls update requests
    • spurious survey popup for users who do not develop in Go
  • Workaround for affected users - explicitly enable/disable the go extension for the workspace based on need through the extension view.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions