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

Auto Save is not working in notebooks #94052

Closed
alexdima opened this issue Mar 31, 2020 · 7 comments
Closed

Auto Save is not working in notebooks #94052

alexdima opened this issue Mar 31, 2020 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality notebook verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@alexdima
Copy link
Member

Testing #93742

  • enable auto-save (File > Auto Save)
  • type in a code cell
  • observe dirty indicator which disappears only when saving with Ctrl+S

image

@rebornix rebornix added the feature-request Request for new features or functionality label Mar 31, 2020
@rebornix rebornix added this to the April 2020 milestone Mar 31, 2020
@bpasero
Copy link
Member

bpasero commented Apr 1, 2020

@rebornix you will get this for free once Notebooks register as working copy via IWorkingCopyService. I am actually surprised how notebooks are not registering already, how do you deal with e.g. hot-exit so far?

@rebornix
Copy link
Member

rebornix commented Apr 1, 2020

@bpasero we didn't do hot exit yet. We will hook it up in April, thanks for the pointer.

@bpasero
Copy link
Member

bpasero commented Apr 2, 2020

@rebornix actually disregard my suggestion to register a working copy, as it seems to me a notebook is always backed by a single text file, is that true?

If so, then you should just resolve the text model (e.g. via text model resolver service and the file URI) and work on that. This model will register itself automatically as working copy and will:

  • auto save (if enabled)
  • backup (on shutdown)

@jrieken
Copy link
Member

jrieken commented Apr 2, 2020

... it seems to me a notebook is always backed by a single text file, is that true?

We don't know that yet. As of today that's up to extensions to decide

@bpasero
Copy link
Member

bpasero commented Apr 2, 2020

@jrieken then it seems you will have to do what custom editors are doing depending on the implementation:

  • backed by text document: custom editor does NOT register a working copy and use the existing model services
  • not backed by text document: custom editor registers a working copy

The working copy service does not allow to register multiple working copies with the same exact resource because e.g. backups are associated with exactly one resource that needs to be unique.

@rebornix
Copy link
Member

rebornix commented Apr 2, 2020

IMHO the notebook is close to Custom Editor. The GitHub issues notebook can be text document based but we are not sure yet if it's valid for Jupyter notebook and other potential notebook use cases. We can discuss this in April's API meeting.

@rebornix
Copy link
Member

Test verify this issue, install the GH issues notebook extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-github-issue-notebooks

@rebornix rebornix added the verification-needed Verification of issue is requested label Apr 29, 2020
@jrieken jrieken added the verified Verification succeeded label Apr 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality notebook verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants