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

Remove notebook content provider save and backup functionality #160581

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Sep 9, 2022

For #147248

When stepping through the liveshare code, we figured out they do not appear to be using save, saveAs, or backup (they return empty results for these)

This PR removes this part of the proposal so we can track just the parts of the api that they are using

For microsoft#147248

When stepping through the liveshare code, we figured out they do not appear to be using `save`, `saveAs`, or `backup` (they return empty results for these)

This PR removes this part of the proposal so we can track just the parts of the api that they are using
@mjbvz mjbvz added this to the September 2022 milestone Sep 9, 2022
@mjbvz mjbvz requested a review from rebornix September 9, 2022 23:42
@mjbvz mjbvz self-assigned this Sep 9, 2022
@mjbvz mjbvz enabled auto-merge (squash) September 9, 2022 23:42
@@ -22,8 +22,6 @@ export interface INotebookContentProvider {
options: TransientOptions;

open(uri: URI, backupId: string | VSBuffer | undefined, untitledDocumentData: VSBuffer | undefined, token: CancellationToken): Promise<{ data: NotebookData; transientOptions: TransientOptions }>;
save(uri: URI, token: CancellationToken): Promise<boolean>;
saveAs(uri: URI, target: URI, token: CancellationToken): Promise<boolean>;
backup(uri: URI, token: CancellationToken): Promise<string | VSBuffer>;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I left backup in place here as the interactive window still seems to be using it

@@ -377,7 +377,7 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook
if (!this.isResolved()) {
return;
}
const success = await this._contentProvider.save(this.notebook.uri, CancellationToken.None);
const success = false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not familiar enough with this code to do a better fix

The interactive window always returns false for these methods

Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

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

We are also not using the save functionality in the core (for IW), 👍 for removing them.

@mjbvz mjbvz merged commit 2514759 into microsoft:main Sep 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants