Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robustify startup, error handling, and logging #4584

Merged
merged 6 commits into from
May 23, 2023

Conversation

andyleejordan
Copy link
Member

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.

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

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.
@andyleejordan
Copy link
Member Author

Wow it really was just the timeout 😬

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

@andyleejordan andyleejordan merged commit bce391b into main May 23, 2023
13 checks passed
@andyleejordan andyleejordan deleted the andschwa/robust-startup branch May 23, 2023 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants