From 8a5f6fa5ce5d45f60a0fc49a2b29201fa1f271a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Tue, 17 Nov 2020 15:29:34 +0100 Subject: [PATCH] include remote-wsl by default --- build/gulpfile.vscode.js | 14 ++++++++++++-- build/lib/builtInExtensions.ts | 10 ++++++++++ product.json | 16 ++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 3c8bbe5b87f..1bcd653656b 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -161,7 +161,17 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op .pipe(rename(function (path) { path.dirname = path.dirname.replace(new RegExp('^' + out), 'out'); })) .pipe(util.setExecutableBit(['**/*.sh'])); - const extensions = gulp.src('.build/extensions/**', { base: '.build', dot: true }); + const platformSpecificBuiltInExtensionsFilter = product.builtInExtensions.filter(ext => { + if (!ext.platforms) { + return false; + } + + const set = new Set(ext.platforms); + return !set.has(platform); + }).map(ext => `!.build/extensions/${ext.name}/**`); + + const extensions = gulp.src('.build/extensions/**', { base: '.build', dot: true }) + .pipe(filter(['**', ...platformSpecificBuiltInExtensionsFilter])); const sources = es.merge(src, extensions) .pipe(filter(['**', '!**/*.js.map'], { dot: true })); @@ -201,7 +211,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op const telemetry = gulp.src('.build/telemetry/**', { base: '.build/telemetry', dot: true }); - const jsFilter = util.filter(data => !data.isDirectory() &&/\.js$/.test(data.path)); + const jsFilter = util.filter(data => !data.isDirectory() && /\.js$/.test(data.path)); const root = path.resolve(path.join(__dirname, '..')); const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`])); diff --git a/build/lib/builtInExtensions.ts b/build/lib/builtInExtensions.ts index b20913f49d1..20f2ee0aa32 100644 --- a/build/lib/builtInExtensions.ts +++ b/build/lib/builtInExtensions.ts @@ -21,6 +21,7 @@ interface IExtensionDefinition { name: string; version: string; repo: string; + platforms?: string[]; metadata: { id: string; publisherId: { @@ -82,6 +83,15 @@ function syncMarketplaceExtension(extension: IExtensionDefinition): Stream { } function syncExtension(extension: IExtensionDefinition, controlState: 'disabled' | 'marketplace'): Stream { + if (extension.platforms) { + const platforms = new Set(extension.platforms); + + if (!platforms.has(process.platform)) { + log(ansiColors.gray('[skip]'), `${extension.name}@${extension.version}: Platform '${process.platform}' not supported: [${extension.platforms}]`, ansiColors.green('✔︎')); + return es.readArray([]); + } + } + switch (controlState) { case 'disabled': log(ansiColors.blue('[disabled]'), ansiColors.gray(extension.name)); diff --git a/product.json b/product.json index 2d2bb2c605a..9fff131af79 100644 --- a/product.json +++ b/product.json @@ -119,6 +119,22 @@ }, "publisherDisplayName": "Microsoft" } + }, + { + "name": "ms-vscode-remote.remote-wsl", + "version": "0.51.3", + "repo": "https://github.com/microsoft/vscode-remote-release", + "metadata": { + "id": "f0c5397b-d357-4197-99f0-cb4202f22818", + "publisherId": { + "publisherId": "ac9410a2-0d75-40ec-90de-b59bb705801d", + "publisherName": "ms-vscode", + "displayName": "Microsoft", + "flags": "verified" + }, + "publisherDisplayName": "Microsoft" + }, + "platforms": ["win32"] } ], "webBuiltInExtensions": [