-
Notifications
You must be signed in to change notification settings - Fork 28.9k
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 kernel preloads globals API #163513
Comments
@mjbvz I've made the changes in Jupyter, will remote the corresponding VS code changes and test this out later today/tomorrow. |
@mjbvz If so, then this issue has not been completed and I've missed some other parts. async function activateModuleKernelPreload(url: string) {
const module: KernelPreloadModule = await __import(url);
if (!module.activate) {
console.error(`Notebook preload '${url}' was expected to be a module but it does not export an 'activate' function`);
return;
}
return module.activate(createKernelContext());
} |
@DonJayamanne We can remove that once the stable version of Jupyter is also using modules. Has that release switched over or do we need to wait? |
Not yet, I missed one bit and here's the corresponding PR microsoft/vscode-jupyter-ipywidgets#16 |
This should now be fixed. |
Kernel preloads can currently be loaded two ways:
activate
function. We invoke this function with the notebook APII would like to remove the second approach as it is not something we want to finalize. For now we can still allow global scripts, but they should not have access to the VS Code apis such as
acquireVsCodeApi
@DonJayamanne @rebornix Can you please check to see if the jupyter preloads use the global versions of any of the following API:
acquireVsCodeApi
onDidReceiveKernelMessage
postKernelMessage
If you are using these, is it possible to switch to use module based preloads instead? If you cannot, what are the blockers?
The text was updated successfully, but these errors were encountered: