mamba-org / vscode-micromamba

A VSCode extension to generate development environments using micromamba and conda-forge package repository
BSD 3-Clause "New" or "Revised" License
82 stars 10 forks source link

Limit extension activation events #52

Closed anton-matosov closed 1 month ago

anton-matosov commented 2 months ago

Currently activation event is set to * which makes extension always active. This results in extension always showing Micromamba: Open a folder or a workspace on startup And extension will attempt to activate for every workspace even if it has no environment file consuming memory and CPU.

Extension packaging with vcse confirms this with the following warning:

 WARNING  Using '*' activation is usually a bad idea as it impacts performance.
More info: https://code.visualstudio.com/api/references/activation-events#Start-up

By limiting activationEvents to workspaceContains:environment*.{yml,yaml} extension will remain out of memory unless there is an environment file it can read to activate it. All the commands extension provides are still available and extension will be activate upon command execution:

2024-07-24 18:43:22.918 [info] ExtensionService#_doActivateExtension corker.vscode-micromamba, startup: false, activationEvent: 'onCommand:corker.micromamba.activate.environment.by.path'
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10086736042

Details


Totals Coverage Status
Change from base Build 9595185128: 0.0%
Covered Lines: 394
Relevant Lines: 616

💛 - Coveralls