-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Data loss: Custom editors do not properly deal with extension host restarts #122992
Comments
I can't reproduce this using luna paint. |
Hmm. Seems like a race condition, I follow those exact steps and still can't repro. I would be willing to investigate with you. |
The more I think about it, the more I feel we really should stop restarting extension hosts: #69335 |
We must restart the extension host in the event the workspace is no longer trusted, so perhaps custom editors need to participate in that transition to avoid data loss |
Fyi, yesterday I pushed support for
However, I think this issue is more tricky for (non-text) custom editors, because we do not really know how the extension has implemented the If we cannot restore the dirty editor properly after the extension host has restarted, we should at least make sure to reopen the editor with the dirty contents (= backup) after the extension host has started again. |
From my discussion with Matt it appears the solution to this issue revolves around persisting the model managers upon extension host restart and syncing the models and webviews to the new ext host. |
Would the issue be solved if the custom editor was just resolved again (call |
One idea from @alexdima was to introduce a participation model for extension host restarts: any component can veto the restart and thus custom editors could show a modal dialog to users in case this is needed and veto the restart. |
#182558 addressed this 👍 |
Verified, but I think #183778 is a core problem. |
Steps to Reproduce:
=> the custom editor is gone and so is the data
The text was updated successfully, but these errors were encountered: