From c93fe0d58bf38d3a7ae0d742ee09782382de3b56 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 14 Aug 2018 10:53:59 +0200 Subject: [PATCH] ensure uploading source maps happens *after* they have been created --- build/gulpfile.vscode.js | 2 +- build/lib/extensions.js | 2 ++ build/lib/extensions.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 54648e7f5ef..54c55ef6bae 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -451,7 +451,7 @@ gulp.task('vscode-translations-import', function () { // Sourcemaps -gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => { +gulp.task('upload-vscode-sourcemaps', ['vscode-darwin-min'/*here to ensure webpack has happened*/, 'minify-vscode'], () => { const vs = gulp.src('out-vscode-min/**/*.map', { base: 'out-vscode-min' }) .pipe(es.mapSync(f => { f.path = `${f.base}/core/${f.relative}`; diff --git a/build/lib/extensions.js b/build/lib/extensions.js index 51b5dd2a576..9afed560031 100644 --- a/build/lib/extensions.js +++ b/build/lib/extensions.js @@ -36,6 +36,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) { // and merge its output with the files stream. also rewrite the package.json // file to a new entry point if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) { + console.log("Using Webpack for \"" + extensionPath + "\""); var packageJsonFilter = filter('package.json', { restore: true }); var patchFilesStream = filesStream .pipe(packageJsonFilter) @@ -67,6 +68,7 @@ function fromLocal(extensionPath, sourceMappingURLBase) { fs.mkdirSync(path.dirname(data.path)); } fs.writeFileSync(data.path, data.contents); + console.log("Webpack source maps saved as \"" + data.path + "\""); } } this.emit('data', data); diff --git a/build/lib/extensions.ts b/build/lib/extensions.ts index 206572f23ff..ebfca72e1d1 100644 --- a/build/lib/extensions.ts +++ b/build/lib/extensions.ts @@ -40,6 +40,8 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string): // and merge its output with the files stream. also rewrite the package.json // file to a new entry point if (fs.existsSync(path.join(extensionPath, 'extension.webpack.config.js'))) { + console.log(`Using Webpack for "${extensionPath}"`); + const packageJsonFilter = filter('package.json', { restore: true }); const patchFilesStream = filesStream @@ -74,6 +76,7 @@ export function fromLocal(extensionPath: string, sourceMappingURLBase?: string): fs.mkdirSync(path.dirname(data.path)); } fs.writeFileSync(data.path, data.contents); + console.log(`Webpack source maps saved as "${data.path}"`); } } this.emit('data', data); -- GitLab