-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support downloading of additional resources when installing an extension #53855
Comments
We'd need to be able to filter applicability of resources based on:
|
@jasongin It might be better to leave the construction of an URL up to the extension. You get access to this information today: import * as os from 'os';
import * as vscode from 'vscode';
const e2c = require('electron-to-chromium');
export function activate(context: vscode.ExtensionContext) {
const { version } = require(context.asAbsolutePath('./package.json')) as { version: string };
const platformVersion = (os.release() || '').replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/, '$1$2$3');
const chromiumVersion = process.versions.v8.replace(/^(\d+)\.(\d+)\.(.*)/, '$1$2');
const electronVersion = e2c.chromiumToElectron(chromiumVersion);
let exeContext = {
extensionVersion: version,
vscodeVersion: vscode.version,
platform: process.platform,
platformVersion,
platformArch: process.arch,
electronVersion
}
...
} |
My comment above was assuming a declarative approach, such as an extension declaring additional external dependencies in its If there is an API / command to do ad-hoc downloads then obviously that's more flexible so extensions can use any arbitrary logic to determine what to download and when. But for the specific case of downloading dependencies needed at extension startup, it's a little more work for extension developers, and maybe not as good user experience, since the extension has to indicate the download is in progress and the extension is not functional until that finishes. |
Closing in favour of #59112 |
Support downloading of additional resources when installing an extension
The text was updated successfully, but these errors were encountered: