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 extension files in EditorAppExtended #680

Merged
merged 5 commits into from
Jun 25, 2024

Conversation

vrama628
Copy link
Contributor

Fixes #679

There was a bug where disposing and then reinitializing an EditorAppExtended where an extension has filesOrContents would result in an exception being thrown due to not disposing these files from the last time the extension was registered. This fixes that by disposing of the results of registerFileUrl in the disposeApp method.

I added a test to exercise this; the test introduced in the first commit exhibits the Error: file 'extension-file://undefined.undefined/' already exists error, and that error goes away in the second commit. Unfortunately, when I run this test suite, I also get a bunch of "Array buffer allocation failed" errors that seem to come from somewhere in VSCode's services. I tried using the updateExtendedAppPrototyp test helper to fix this, but that seems to remove so much functionality that the original "file already exists" error no longer happens in the first place. Open to suggestions on how to fix the test, or I can just remove the test so we can ship the fix.

@kaisalmen
Copy link
Collaborator

@vrama628 thank you for your contribution. Please move the test to a different Draft PR. I don't have a solution for that and need to investigate further. updateExtendedAppPrototyp is a hack/workaround for the tests.

@vrama628
Copy link
Contributor Author

@kaisalmen Thanks, I've moved the test into a separate draft PR #688 and updated to import { DisposableStore } from 'vscode/monaco'.

Copy link
Collaborator

@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. Thank you.

@kaisalmen kaisalmen merged commit 515c327 into TypeFox:main Jun 25, 2024
1 check passed
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.

wrapper.dispose() does not get rid of extension
3 participants