Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
Warnings indicated a build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Sep 25, 2018
1 parent df55f2b commit 0701881
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.5.2

- Warnings indicated a build failure

## 2.5.1

- Resolve `~` to the home dir #30
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "https://github.com/vknabel"
},
"license": "Apache-2.0",
"version": "2.5.1",
"version": "2.5.2",
"publisher": "vknabel",
"icon": "icons/icon.png",
"galleryBanner": {
Expand Down
13 changes: 5 additions & 8 deletions src/SwiftTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export function buildPackage(
pkgPath: string,
params: string[]
) {
stdout = null;
stderr = null;
stdout = "";
stderr = "";
error = null;
const sb = cp.spawn(swiftBinPath, params, { cwd: pkgPath });
sb.stdout.on("data", data => {
Expand All @@ -45,9 +45,10 @@ export function buildPackage(
trace(`***swift build command exited*** code: ${code}, signal: ${signal}`);
dumpInConsole("\n");
diagnosticCollection.clear();
if (stderr && stdout) {
if (stderr) {
dumpDiagnostics();
} else if (stderr) {
}
if (code != 0) {
makeBuildStatusFailed();
} else {
makeBuildStatusSuccessful();
Expand Down Expand Up @@ -123,10 +124,6 @@ function dumpDiagnostics() {
diagnosticMap.forEach((diags, file) => {
diagnosticCollection.set(Uri.parse(file), diags);
});

// trace(stderr)
// trace("build failed")
makeBuildStatusFailed();
}

function toVSCodeSeverity(sev: string) {
Expand Down

0 comments on commit 0701881

Please sign in to comment.