Skip to content

Commit 2038657

Browse files
committed
Revert "Cleanup"
This reverts commit 26e7b86.
1 parent 5a6f3d4 commit 2038657

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/SwiftPackage.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ export class SwiftPackage {
269269
dependencies: [],
270270
targets: [],
271271
};
272+
// eslint-disable-next-line no-console
273+
console.log(">>> ", folderContext.folder.fsPath, ">>> DISABLED, EMPTY: ", empty);
272274
this.contentsResolve(empty);
273275
return empty;
274276
}
@@ -285,19 +287,37 @@ export class SwiftPackage {
285287
};
286288

287289
this.contentsResolve(packageState);
290+
// eslint-disable-next-line no-console
291+
console.log(">>> ", folderContext.folder.fsPath, ">>> SUCCESS: ", packageState);
288292
return packageState;
289293
} catch (error: unknown) {
294+
// eslint-disable-next-line no-console
295+
console.log(">>> ", folderContext.folder.fsPath, ">>> ERROR: ", error);
290296
const errorMessage = error instanceof Error ? error.message : String(error);
291297
// if caught error and it begins with "error: root manifest" then there is no Package.swift
292298
if (
293299
errorMessage.startsWith("error: root manifest") ||
294300
errorMessage.startsWith("error: Could not find Package.swift")
295301
) {
302+
// eslint-disable-next-line no-console
303+
console.log(
304+
">>> ",
305+
folderContext.folder.fsPath,
306+
">>> RESOLVE, UNDEFINED: ",
307+
undefined
308+
);
296309
this.contentsResolve(undefined);
297310
return undefined;
298311
} else {
299312
// otherwise it is an error loading the Package.swift so return `null` indicating
300313
// we have a package but we failed to load it. Calling resolve instead of reject is intent
314+
// eslint-disable-next-line no-console
315+
console.log(
316+
">>> ",
317+
folderContext.folder.fsPath,
318+
">>> RESOLVE, ERROR: ",
319+
Error(getErrorDescription(error))
320+
);
301321
this.contentsResolve(Error(getErrorDescription(error)));
302322
return Error(getErrorDescription(error));
303323
}

src/commands/generateSourcekitConfiguration.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export async function determineSchemaURL(folderContext: FolderContext): Promise<
132132
const versionString = `${version.major}.${version.minor}`;
133133
let branch =
134134
configuration.lspConfigurationBranch || (version.dev ? "main" : `release/${versionString}`);
135-
136135
if (!(await checkURLExists(schemaURL(branch)))) {
137136
branch = "main";
138137
}

0 commit comments

Comments
 (0)