fix: gracefully degrade when LS fails to start

Description

This small MR introduces a timeout for the LS to start (10 seconds).

If the LS fails to start, the rest of the extension keeps working.

Before this change, the extension would hang indefinitely if the LS fails to start.

This MR is more for local development purposes, I don't expect total LS failure in production since we have it covered by tests.

How has this been tested?

  1. Connect LS to the VS Code Extension
  2. Break LS by, for example, removing a necessary DI dependency from the contributinos.ts
  3. Start the extension
  4. Before the extension initialization hang indefinitely, after the MR, the initialization finishes without the LS
before after
image image

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes

Merge request reports

Loading
Loading