Skip to content

Commit c5ba0cf

Browse files
committed
Final cleanup
1 parent d49b685 commit c5ba0cf

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.vscode-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
const { defineConfig } = require("@vscode/test-cli");
1616
const path = require("path");
1717

18-
const isCIBuild = false; // process.env["CI"] === "1";
18+
const isCIBuild = process.env["CI"] === "1";
1919
const isFastTestRun = process.env["FAST_TEST_RUN"] === "1";
2020

2121
// "env" in launch.json doesn't seem to work with vscode-test

src/commands/build.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,25 @@ export async function debugBuildWithOptions(
7474
) {
7575
const current = ctx.currentFolder;
7676
if (!current) {
77-
console.log(" >>> debugBuildWithOptions: No current folder on WorkspaceContext");
77+
console.log("debugBuildWithOptions: No current folder on WorkspaceContext");
7878
return;
7979
}
8080

8181
const file = vscode.window.activeTextEditor?.document.fileName;
8282
if (!file) {
83-
console.log(" >>> debugBuildWithOptions: No active text editor");
83+
console.log("debugBuildWithOptions: No active text editor");
8484
return;
8585
}
8686

8787
const target = current.swiftPackage.getTarget(file);
8888
if (!target) {
89-
console.log(" >>> debugBuildWithOptions: No active target");
89+
console.log("debugBuildWithOptions: No active target");
9090
return;
9191
}
9292

9393
if (target.type !== "executable") {
9494
console.log(
95-
` >>> debugBuildWithOptions: Target is not an executable, instead is ${target.type}`
95+
`debugBuildWithOptions: Target is not an executable, instead is ${target.type}`
9696
);
9797
return;
9898
}

test/integration-tests/DiagnosticsManager.test.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,12 @@ suite("DiagnosticsManager Test Suite", async function () {
376376
test("Parse partial line", async () => {
377377
const fixture = testSwiftTask("swift", ["build"], workspaceFolder, toolchain);
378378
await vscode.tasks.executeTask(fixture.task);
379-
const diagnosticsPromise = Promise.resolve(); // waitForDiagnostics([mainUri]);
380379
// Wait to spawn before writing
381380
fixture.process.write(`${mainUri.fsPath}:13:5: err`, "");
382381
fixture.process.write("or: Cannot find 'fo", "");
383382
fixture.process.write("o' in scope");
384383
fixture.process.close(1);
385384
await waitForNoRunningTasks();
386-
await diagnosticsPromise;
387385
// Should have parsed
388386
assertHasDiagnostic(mainUri, outputDiagnostic);
389387
});
@@ -392,15 +390,13 @@ suite("DiagnosticsManager Test Suite", async function () {
392390
test("Ignore duplicates", async () => {
393391
const fixture = testSwiftTask("swift", ["build"], workspaceFolder, toolchain);
394392
await vscode.tasks.executeTask(fixture.task);
395-
const diagnosticsPromise = Promise.resolve(); // waitForDiagnostics([mainUri]);
396393
// Wait to spawn before writing
397394
const output = `${mainUri.fsPath}:13:5: error: Cannot find 'foo' in scope`;
398395
fixture.process.write(output);
399396
fixture.process.write("some random output");
400397
fixture.process.write(output);
401398
fixture.process.close(1);
402399
await waitForNoRunningTasks();
403-
await diagnosticsPromise;
404400
const diagnostics = vscode.languages.getDiagnostics(mainUri);
405401
// Should only include one
406402
assert.equal(diagnostics.length, 1);
@@ -410,12 +406,10 @@ suite("DiagnosticsManager Test Suite", async function () {
410406
test("New set of swiftc diagnostics clear old list", async () => {
411407
let fixture = testSwiftTask("swift", ["build"], workspaceFolder, toolchain);
412408
await vscode.tasks.executeTask(fixture.task);
413-
let diagnosticsPromise = Promise.resolve(); // waitForDiagnostics([mainUri]);
414409
// Wait to spawn before writing
415410
fixture.process.write(`${mainUri.fsPath}:13:5: error: Cannot find 'foo' in scope`);
416411
fixture.process.close(1);
417412
await waitForNoRunningTasks();
418-
await diagnosticsPromise;
419413
let diagnostics = vscode.languages.getDiagnostics(mainUri);
420414
// Should only include one
421415
assert.equal(diagnostics.length, 1);
@@ -424,10 +418,8 @@ suite("DiagnosticsManager Test Suite", async function () {
424418
// Run again but no diagnostics returned
425419
fixture = testSwiftTask("swift", ["build"], workspaceFolder, toolchain);
426420
await vscode.tasks.executeTask(fixture.task);
427-
diagnosticsPromise = Promise.resolve(); // waitForDiagnostics([mainUri]);
428421
fixture.process.close(0);
429422
await waitForNoRunningTasks();
430-
await diagnosticsPromise;
431423
diagnostics = vscode.languages.getDiagnostics(mainUri);
432424
// Should have cleaned up
433425
assert.equal(diagnostics.length, 0);

0 commit comments

Comments
 (0)