Skip to content

Commit

Permalink
fix: Don't wait on the "Buildifier not found" notification (#368)
Browse files Browse the repository at this point in the history
Otherwise, VS Code would assume the extension to not be properly
activated until the user closed the "Buildifier not found" notification.
And as long as the extension activation did not finish, there was a
never-finishing "Loading" indicator on top of the "Bazel Build Targets"
tree view.
  • Loading branch information
vogelsgesang committed Apr 6, 2024
1 parent 09daa3d commit 8b659a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,12 @@ export async function activate(context: vscode.ExtensionContext) {

// Notify the user if buildifier is not available on their path (or where
// their settings expect it).
// eslint-disable-next-line @typescript-eslint/no-floating-promises
await checkBuildifierIsAvailable();
// We intentionally do no `await` the completion because doing so would mean
// that VS Code considers the extension activation to be "in-flight" until the
// users closes the "Buildifier not found" notification. VS Code hence
// dislayed never-finishing "Loading" indicator on top of the "Bazel Build
// Targets" tree view.
checkBuildifierIsAvailable();
}

/** Called when the extension is deactivated. */
Expand Down

0 comments on commit 8b659a2

Please sign in to comment.