Skip to content

Commit 890dc19

Browse files
committed
[release] prepare v0.28.0 release (4) - windows fix
171cc61 src/goToolPprof: execFile instead of exec 0ae12d0 src/goTest/resolve: fix Windows path handling bff0d0a CHANGELOG.md: mention test explorer on Windows is a work-in-progress Change-Id: Ie8fcd0c4cf2e55424b0b3e18ad3fddc9d8bca64c
2 parents 9b5b7e4 + 171cc61 commit 890dc19

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This version requires VS Code 1.59 or newer.
44

5-
🎉🧪 The extension implements [the Testing API of VS Code](https://code.visualstudio.com/api/extension-guides/testing). You can navigate and run/profile tests using the test explorer UI! Further work for better profiling and debugging support through the test explorer is underway. Please give it a try and provide feedback.
5+
🎉🧪 The extension implements [the Testing API of VS Code](https://code.visualstudio.com/api/extension-guides/testing). You can navigate and run/profile tests using the test explorer UI! Windows support and further work for better profiling and debugging support through the test explorer is underway. Please give it a try and provide feedback.
66

77
A list of all issues and changes can be found in the [v0.28.0 milestone](https://github.com/golang/vscode-go/milestone/34) and [commit history](https://github.com/golang/vscode-go/compare/v0.27.2...v0.28.0).
88

src/goTest/resolve.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ export class GoTestResolver {
304304
let item: TestItem;
305305

306306
const nested = getGoConfig(uri).get('testExplorer.packageDisplayMode') === 'nested';
307-
const modDir = await getModFolderPath(uri, true);
307+
const modDir = Uri.file(await getModFolderPath(uri, true)); // TODO support non-file schemes
308308
const wsfolder = workspace.getWorkspaceFolder(uri);
309309
if (modDir) {
310310
// If the package is in a module, add it as a child of the module
311-
let parent = await this.getModule(uri.with({ path: modDir, query: '', fragment: '' }));
311+
let parent = await this.getModule(modDir);
312312
if (uri.path === parent.uri.path) {
313313
return parent;
314314
}

src/goToolPprof.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2021 The Go Authors. All rights reserved.
33
* Licensed under the MIT License. See LICENSE in the project root for license information.
44
*--------------------------------------------------------*/
5-
import { exec } from 'child_process';
5+
import { execFile } from 'child_process';
66
import { window, CancellationToken, TextDocumentContentProvider, Uri } from 'vscode';
77
import { outputChannel } from './goStatus';
88
import { getBinPath } from './util';
@@ -15,7 +15,7 @@ export class ProfileDocumentContentProvider implements TextDocumentContentProvid
1515
private pprof(uri: Uri, token: CancellationToken) {
1616
const goBin = getBinPath('go');
1717
return new Promise<string | undefined>((resolve) => {
18-
const cp = exec(`${goBin} tool pprof -tree ${uri.fsPath}`, async (err, stdout, stderr) => {
18+
const cp = execFile(goBin, ['tool', 'pprof', '-tree', uri.fsPath], async (err, stdout, stderr) => {
1919
if (err || stderr) {
2020
const m = 'Failed to execute `go tool pprof`';
2121
if (err) outputChannel.appendLine(`${m}: ${err}`);

0 commit comments

Comments
 (0)