Conversation

andyleejordan

This was a couple late nights that resulted in an overhaul of our startup, error handling, and logging logic. Mostly because I realized how dang easy it was to get things into a funky state when I added editorServicesWaitForDebugger to the list of settings that will prompt for a restart. This made it really easy to test, especially in the "still starting up" state. It is still possible to generate perhaps more error messages than I'd like, but they mostly come from the LSP client library. In fact, the last bug I tracked down is that if the client failed to start, it can't be stopped (which throws an exception) AND it can't be disposed, the latter of which I think is an upstream bug I'll need to investigate.

@andyleejordanandyleejordan requested a review from a team May 20, 2023 01:39
@andyleejordanandyleejordan force-pushed the andschwa/robust-startup branch 4 times, most recently from a4695cd to c1a3621 Compare May 23, 2023 00:01
@andyleejordan

This got big enough I split it out into sensible commits.

This addition is what spurned the rest of the following changes.
It made it really easy to test the robustness of our start/stop/restart logic.
Includes some reorganization, a new cancellation token, and a bunch of bug fixes.
We can now consistently restart the language server without losing track of the
Extension Terminal, even if it's still starting up. Our `SessionStatus` is now
actually useful, and the logical flow actually makes sense. Plus the giant
methods have been broken up and error handling is consistent.
@andyleejordanandyleejordan force-pushed the andschwa/robust-startup branch from c1a3621 to 5304fa3 Compare May 23, 2023 00:10
@andyleejordanandyleejordan requested a review from a team as a code owner May 23, 2023 18:30
@andyleejordanandyleejordan force-pushed the andschwa/robust-startup branch from ed2a82e to 5304fa3 Compare May 23, 2023 18:34
@andyleejordanandyleejordan force-pushed the andschwa/robust-startup branch from 86e16f0 to aff6982 Compare May 23, 2023 20:03
@andyleejordan

Wow it really was just the timeout 😬

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on . Already have an account? Sign in to comment
Area-Startup Issue-BugA bug to squash.
Status: Done

Successfully merging this pull request may close these issues.