Skip to content

The kernel selection UI should not appear if only one notebook controller is marked as preferred #131370

@davidanthoff

Description

@davidanthoff

The following scenario:

  1. I create a new Jupyter Notebook in Jupyter Lab and select the Julia 1.6.2 kernel, save the file.
  2. I open the same file in VS Code. I only have the Julia extension installed, and the Julia extension registers two notebook controllers with VS Code: one for Julia 1.6.2 and one for Julia 1.5.4.
  3. Currently VS Code now prompts me to select a kernel, but I think that UI prompt should not appear in this scenario, instead the Julia 1.6.2 kernel should just be used automatically.

The Julia extension will in the vast majority of cases only mark one of its controllers as preferred in https://github.com/julia-vscode/julia-vscode/blob/0eff0794e2433b4ce6289383d1afef8b43163c69/src/notebook/notebookFeature.ts#L76. I think in general, if only one controller is marked as preferred for a Jupyter notebook file that is opened for the first time in VS Code, then VS Code should just select that controller and not show any UI to the user to make a choice. There are a few situations where the Julia extension will not be able to select just one kernel (for example if a user has both a x64 and a x86 Julia 1.6.2 installed), and in those cases it would be good if the kernel selection UI pops up.

The current behavior is a) quite annoying if one works with a lot of Jupyter notebook files that originate from collaborators that use other clients and b) is also inconsistent with every other Jupyter notebook client that I know. Juptyer Lab, nteract and classical Jupyter notebook all don't prompt users to make manual kernel selections if the kernel that is specified in the notebook file itself exists as a perfect match on the user system. I think VS Code should try to mimic that UI experience.

Another way to think about this: if I have Julia 1.6.2 installed, and I get a notebook file that specifies a Julia 1.6.2 kernel, there is really zero value in me having to then manually pick that kernel, it should just be automatic.

Metadata

Metadata

Assignees

Labels

notebook-executionIssues related to running cells in a notebookunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions