Skip to content

Commit c1a515e

Browse files
committed
Open tutorial before extension activation
To reduce lag when checking for the existence of the tutorial workspace.
1 parent 0368d53 commit c1a515e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

extensions/ql-vscode/src/extension.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,6 @@ export async function activate(
345345
codeQlExtension.variantAnalysisManager,
346346
);
347347

348-
try {
349-
await prepareCodeTour();
350-
} catch (e: unknown) {
351-
void extLogger.log(
352-
`Could not open tutorial workspace automatically: ${getErrorMessage(e)}`,
353-
);
354-
}
355-
356348
return codeQlExtension;
357349
}
358350

@@ -540,6 +532,14 @@ async function installOrUpdateThenTryActivate(
540532
): Promise<CodeQLExtensionInterface | Record<string, never>> {
541533
await installOrUpdateDistribution(ctx, distributionManager, config);
542534

535+
try {
536+
await prepareCodeTour();
537+
} catch (e: unknown) {
538+
void extLogger.log(
539+
`Could not open tutorial workspace automatically: ${getErrorMessage(e)}`,
540+
);
541+
}
542+
543543
// Display the warnings even if the extension has already activated.
544544
const distributionResult =
545545
await getDistributionDisplayingDistributionWarnings(distributionManager);

0 commit comments

Comments
 (0)