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

Test Notebook kernel provider #103883

Closed
2 tasks done
rebornix opened this issue Aug 3, 2020 · 0 comments
Closed
2 tasks done

Test Notebook kernel provider #103883

rebornix opened this issue Aug 3, 2020 · 0 comments

Comments

@rebornix
Copy link
Member

rebornix commented Aug 3, 2020

Refs: #101963

Complexity: 3

Create Issue


This month we introduced a kernel provider concept in Notebook, which can behaves similarly to language providers, it can provider available kernels for a notebook document.

export interface NotebookKernelProvider<T extends NotebookKernel = NotebookKernel> {
onDidChangeKernels?: Event<void>;
provideKernels(document: NotebookDocument, token: CancellationToken): ProviderResult<T[]>;
resolveKernel?(kernel: T, document: NotebookDocument, webview: NotebookCommunication, token: CancellationToken): ProviderResult<void>;
}

Please verify:

  • yo code to create a notebook provider/renderer sample (or clone https://github.com/microsoft/vscode-generator-code/tree/master/generators/app/templates/ext-notebook-renderer)
    • use INCLUDE_PROPOSED=1 yo code to be able to create a renderer with test kernel
  • Create a kernel provider, which can handle the file type you registered for notebook content provider
  • Test that when you return multiple kernels for a document, you can switch kernels through status bar or command "Select Kernel"
  • Test that if you return a kernel with isPreferred, the kernel is picked automatically (which means it has highest order)
  • Test that if you have two extensions, each of which contributes a kernel provider, users can use notebook.kernelProviderAssociations to choose which kernel provider to use by default.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants