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

chore: clean up activation events #3510

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented Jan 8, 2024

and remove onNotebook:jupyter-notebook event

Fixes #3505.

For every PR, please check the following:

  • End-user documentation check. If this PR requires end-user documentation, please add that at https://github.com/julia-vscode/docs.
  • Changelog mention. If this PR should be mentioned in the CHANGELOG, please edit the CHANGELOG.md file in this PR.

and remove `onNotebook:jupyter-notebook` event
@davidanthoff
Copy link
Member

and remove onNotebook:jupyter-notebook event

Can we do that? Wouldn't that mean that if someone opens an empty folder, creates a new notebook, that they won't even be shown the Julia kernels, unless they first do something else to activate the extension?

@pfitzseb
Copy link
Member Author

pfitzseb commented Jan 9, 2024

Yes, indeed. Setting the cell language to Julia will trigger activation though, which might be good enough.

@davidanthoff
Copy link
Member

I think what we really need is a state where the extension is loaded, but things like the LS aren't started... Some kind of lightweight state that the extension can be in when there isn't any Julia file in the workspace yet.

@pfitzseb
Copy link
Member Author

pfitzseb commented Jan 9, 2024

Yes, but the question is what we want to do in the meantime. Imho this trade-off is worth it.

@davidanthoff
Copy link
Member

Imho this trade-off is worth it.

I don't know, that really degrades the notebook experience if one first has to select the cell language and then select a kernel. In my mind the flow really is to select the kernel first, and that then sets the language for the cells...

@singularitti
Copy link

Is it possible to make it configurable then?

@davidanthoff
Copy link
Member

Is it possible to make it configurable then?

I don't think so...

@singularitti
Copy link

singularitti commented Jan 14, 2024

that they won't even be shown the Julia kernels, unless they first do something else to activate the extension?

I wouldn't mind it. Usually when I want to activate the Julia notebook, there are already some Julia files in it. I could just open one of them. In fact, I don't think we should by default have the Julia extension activated whenever we have a notebook: sometimes I just want to write Python code and the Julia language server bites a lot of memory even I'll never use the directory. Consider people who use other languages that Jupyter supports, I don't think they want to see the same thing either.

@davidanthoff
Copy link
Member

Usually when I want to activate the Julia notebook, there are already some Julia files in it.

Certainly not for me. I very often create a new empty folder, start VS Code in it and create an empty notebook and select a Julia kernel.

I think at the end of the day this is just a bit of a design problem in the notebook API of VS Code. They should have had a way to declare that an extension can offer kernels, so that loading of the extension can be delayed further.

I'm all for us changing things so that the LS doesn't always start up when the extension gets loaded. I'm not sure how difficult that is, but maybe it would actually be not super complicated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary Activation of Julia Extension in Jupyter Notebooks where Julia is not involved
3 participants