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

[3.2] TextDocuments is no longer compatible with NotebookDocument #1686

Open
cdietrich opened this issue Sep 18, 2024 · 2 comments
Open

[3.2] TextDocuments is no longer compatible with NotebookDocument #1686

cdietrich opened this issue Sep 18, 2024 · 2 comments
Labels
bug Something isn't working documents Related to building documents and indexing

Comments

@cdietrich
Copy link
Contributor

cdietrich commented Sep 18, 2024

in our dsl we also support notebook.
in order to achive that we do something like this in our module

createXxxxxSharedModule(
.....
workspace: {
    NotebookDocument: services => new NotebookDocumentsImpl(new NotebookDocuments(services.workspace.TextDocuments))
}

this does not compile anymore

Argument of type 'TextDocumentProvider & TextDocuments<TextDocument>' is not assignable to parameter of type 'TextDocumentsConfiguration<TextDocument> | TextDocuments<TextDocument>'.
  Type 'TextDocumentProvider & TextDocuments<TextDocument>' is missing the following properties from type 'TextDocuments<TextDocument>': _configuration, _syncedDocuments, _onDidChangeContent, _onDidOpen, and 4 more.

casting fails at runtime

Could not find service instance for uri: 'vscode-notebook-cell:/Users/xxxx/zzz/test.ournb#W2sZmlsZQ%3D%3D'

we did not debug the 2nd part yet.
assume we need to debug that one though.
maybe the uri conversion needs to happen at more places

@cdietrich cdietrich added the bug Something isn't working label Sep 18, 2024
@cdietrich
Copy link
Contributor Author

cdietrich commented Sep 18, 2024

i assume that the

shared.workspace.NotebookDocument.listen(connection)

we do completely bypasses normalization and uses the original text documents

@msujew
Copy link
Member

msujew commented Sep 18, 2024

I believe it would be best if we were to implement our own NotebookDocuments service similar to the TextDocuments. I'm not a big fan of how the NotebookDocumentsImpl is implemented, given that it directly targets a class (and not an interface).

@msujew msujew added the documents Related to building documents and indexing label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documents Related to building documents and indexing
Projects
None yet
Development

No branches or pull requests

2 participants