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

Dispose of Wrapper on Failed Start #182

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Conversation

montymxb
Copy link
Contributor

@montymxb montymxb commented Sep 1, 2023

This addresses an issue with the recent playground changes, where a failed wrapper start was not disposing of the wrapper afterwards. This led to some strange behavior when working with grammars that would produce an invalid LS.

The solution here removes a previous workaround, and instead disposes of the wrapper in the appropriate place.

There is still a remaining issue with worker teardown, which does not succeed when the LC is stuck in a 'starting' state (see TypeFox/monaco-components#41). We're able to address this by first terminating the worker manually, then disposing the wrapper.

Note that the wrapper dispose will fail when the LC is stuck, but the teardown up to that point is sufficient to clean up the rest of the artifacts (editor & associated elements).

Copy link
Contributor

@kaisalmen kaisalmen left a comment

Choose a reason for hiding this comment

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

LGTM

@montymxb montymxb force-pushed the montymxb/fix-wrapper-dispose branch from 4096dc2 to b24315e Compare December 13, 2023 13:44
@montymxb montymxb merged commit 13556b1 into main Dec 13, 2023
1 of 2 checks passed
@montymxb montymxb deleted the montymxb/fix-wrapper-dispose branch December 13, 2023 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants