Skip to content

Commit 9128f15

Browse files
committed
Debug diagnostics tests
1 parent edbf32f commit 9128f15

File tree

4 files changed

+156
-84
lines changed

4 files changed

+156
-84
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 = process.env["CI"] === "1";
18+
const isCIBuild = false; // 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/DiagnosticsManager.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ export class DiagnosticsManager implements vscode.Disposable {
8787
.then(map => {
8888
// Clean up old "swiftc" diagnostics
8989
this.removeSwiftcDiagnostics();
90-
map.forEach((diagnostics, uri) =>
90+
map.forEach((diagnostics, uri) => {
9191
this.handleDiagnostics(
9292
vscode.Uri.file(uri),
9393
DiagnosticsManager.isSwiftc,
9494
diagnostics
95-
)
96-
);
95+
);
96+
});
9797
})
9898
.catch(e =>
9999
context.outputChannel.log(`${e}`, 'Failed to provide "swiftc" diagnostics')
@@ -319,6 +319,7 @@ export class DiagnosticsManager implements vscode.Disposable {
319319
): ParsedDiagnostic | vscode.DiagnosticRelatedInformation | undefined {
320320
const diagnosticRegex = /^(.*?):(\d+)(?::(\d+))?:\s+(warning|error|note):\s+([^\\[]*)/g;
321321
const match = diagnosticRegex.exec(line);
322+
console.log(">>> CHECK LINE", line);
322323
if (!match) {
323324
return;
324325
}

src/tasks/SwiftProcess.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class SwiftPtyProcess implements SwiftProcess {
104104
useConpty,
105105
// https://github.com/swiftlang/vscode-swift/issues/1074
106106
// Causing weird truncation issues
107-
cols: !isWindows || useConpty ? undefined : 2147483647, // Max int32
107+
cols: isWindows ? 4096 : undefined,
108108
});
109109
this.spawnEmitter.fire();
110110
this.spawnedProcess.onData(data => {

0 commit comments

Comments
 (0)