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

Custom editors: extension development is hard due to our way of treating dirty #91701

Closed
bpasero opened this issue Feb 27, 2020 · 3 comments
Closed
Assignees
Labels
custom-editors Custom editor API (webview based editors)
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Feb 27, 2020

Refs #91325

When testing this I had to configure my launch config with --extension-development-confirm-save to get confirm dialogs on close at least.

However, backup is never running in an extension host development window. We probably need to document this or revisit this approach.

@mjbvz mjbvz added the custom-editors Custom editor API (webview based editors) label Feb 27, 2020
@mjbvz mjbvz added this to the March 2020 milestone Feb 27, 2020
@mjbvz
Copy link
Contributor

mjbvz commented Mar 11, 2020

Notes:

  • Different behavior for tests vs running extension
  • Make sure debug stop and cmd+q never prompts
  • Investigate how backups work in extension development

@bpasero
Copy link
Member Author

bpasero commented Mar 12, 2020

I pushed a change to:

  • enable the save/revert dialog when closing a dirty file (unless running tests)
  • enable hot-exit in-memory [1] even in extension development window which allows to still close the window without getting asked to save

[1]: this means that we execute the backup code but actually do not persist it anywhere on disk which I think is fine for the scenario of extension development. because there, the extension will be asked to persist the data for backup and can do so accordingly. upon restart - since the custom editor is likely still open - we will restore it and thus the extension will have a chance to test restoring from backup too.

I think this is a good compromise, let me know otherwise.

@Gama11
Copy link
Contributor

Gama11 commented Mar 12, 2020

Another reason why #25159 would be beneficial? ;)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
custom-editors Custom editor API (webview based editors)
Projects
None yet
Development

No branches or pull requests

3 participants