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
Drop managing source extensions with jupyter labextension
?
#11336
Comments
I would like to keep source extensions at least for the 4.0 cycle. It seems some places upgrade every other version (like some skipped version 2 and moved from 1 to 3), so having it in one more cycle I think would be safe, if it's not a ton of trouble. I would also like to hear from institutional deployments that may want to compile a base system distribution by installing source extensions to see how it is going with them moving to prebuilt extensions. Regardless, I think we should still support the example app, i.e., compiling a custom remix of JupyterLab that relies on jupyterlab_server, even if we remove the framework in JupyterLab for users to install and recompile the base distribution. |
|
Agree. Normally this should still be supported if the source of the extension is published like we recommend to do in https://jupyterlab.readthedocs.io/en/stable/extension/extension_migration.html#publishing-the-extension-to-pypi-and-conda-forge.
This issue is more about dropping the set of |
jupyter labextension
I have updated the title of the issue and the top comment to make that clearer. |
Does that include all of the logic behind the user being able to rebuild JupyterLab? I am often rebuilding JupyterLab with the |
We should indeed keep the possibility to build JupyterLab, since this is what we recommend in the cookiecutter to generate the non-minified assets: https://github.com/jupyterlab/extension-cookiecutter-ts/tree/3.0/%7B%7Bcookiecutter.python_name%7D%7D#development-install |
I'm a big (+1) on this. Anecdotally, the biggest pain point for extensions since 3.0 (in my experience) is users not understanding the difference between source and pre-built, ultimately leading to hard to diagnose problems. |
Updated the top comment to also mention that dropping this would help make the extension ecosystem more consistent across JupyterLab distributions reusing JupyterLab prebuilt extensions, such as:
Another idea would be to reuse the Linking to these issues which are also related: |
This could actually be implemented independently of JupyterLab and live in a separate repo. |
This is a very interesting solution. This way we could keep the extension manager without extensive changes; it would require authors to publish extensions to npm, but not many changes other than that I guess? |
Probably this would need to be a separate package than the source distribution? Or packaged with the source, but with the prebuilt assets in a |
I wonder whether we want to keep this interface around at all? One of the benefits of the prebuilt extensions is that the server-extension and the frontend-extension can be bundled in the same Python package. This means that users don't run into problems when they invariably only install one of the two packages. Even as an experienced user, I occasionally made this mistake. If we persist a
|
Sure! Any archive-driven ecosystem that has a well-known organization (or a canonical place to put schema-validateable metadata) could work. For reference, on lite (at build time) we support harvesting In an
But what this wouldn't help us with is the dependency resolution problem, which real package managers give us "for free" (ha). I can't underline enough how bad life will get if we have to implement our own: for reference, see the UX/provenance nightmare of last two decades that was "get eclipse-for-XYZ running". VSCode gets away with this by being a walled garden, but it has taken a significant effort to get a reasonable open source thing working.
And that.
More broadly, I would like to see all nodejs/npm-specific user-time concerns of lab core moved into a separate package (though probably not a separate repo).
In the 4.0 timeframe, either Or, refactored differently, Selfishly, from a downstream perspective, this would allow, to put a real dependency on
And of course, I support this! |
Questions / concerns.... mostly from an extension developer perspective. I'm sorry if some of this is off topic... I'm happy to move or open another issue if appropriate. Are source extensions deprecated? Are developers being encouraged to move over? "Prebuilt" extensions rely on Webpack's federated module capabilities right? Has the Jupyter dev team already signaled a long-term dependency on Webpack? I've seen notes saying not to rely on it. Has anyone figured out hot-module reloading for federated Webpack modules? Or more generally... what strategy gives developers the fastest cycle from change to viewing that change? Along these lines Vite is getting a lot of attention on pre-building assets. I use Vue extensively in my extension... the I also worry about performance of moving everything to pre-built... |
Thanks @rfox12 for chiming in 👍 This is exactly the kind of feedback and discussion we would like to have with the community to know if or when such change should be made.
There has been a lot of good feedback about the prebuilt extension system, especially from the end users since this considerably simplifies how to install JupyterLab extensions, and does not require having Node.js installed anymore on the end user machine. So in general we recommend distributing a prebuilt extension for this particular reason, but still recommend extension authors to publish the source to
That's right. Also we try to not expose too much of the underlying tooling such as webpack. The Regardless of whether JupyterLab will continue using webpack in the future, one thing for sure is that it will be really difficult to go back to an extension system that requires Node.js on the end user machine. So whatever comes next (if any) should also handle a similar federation mechanism.
Good point. Probably this could already be measured so we have a clearer idea of the impact. Especially since many extensions are now distributed as prebuilt extensions. |
jupyter labextension
jupyter labextension
?
Quick summary from the weekly call today:
cc @vidartf @ajbozarth since you had some input during the call on how this is used at big institutions. It would be great if you could share more about these use cases, thanks! |
Some benefits to source extensions:
|
Opened #12386 to start deprecating managing source extensions with This will be a first step that can go in 4.0. So there is plenty of time for folks until 5.0 where we can consider dropping it. |
#12386 was merged and a warning will be shown when using the Moving this issue to the |
Will the ability to enable/disable extensions from cli be preserved (currently achievable via |
That just updates a JSON file, and doesn't invoke |
Problem
Having two ways to refer to extensions can be confusing to users and extension authors.
It also requires writing documentation (and keeping it up-to-date) about the differences:
It also holds complexity within the JupyterLab code base.
Proposed Solution
We drop support for managing source extensions with
jupyter labextension
:Pros:
install
,update
,uninstall
commands) -> better maintenancejupyter labextension install
bootstrap.js
/index.js
boilerplate and make it easier to reuse in other lab-based apps like retrolab, jupyterlite, voila, quetz-frontendjupyter labextension install / update /uninstall
. They only load prebuilt extensions at startup:Cons:
Additional context
This came up during casual discussions. Also something we have been thinking about over in JupyterLite. Trying to imagine what it would look like if everything was a federated extension, even the core plugins.
Also many third-party extensions have now been updated to be prebuilt extensions since it's a much better experience for the end user. There should now be a lot less users installing extensions with
jupyter labextension install
.Opening this issue now to check whether this is something we would like to consider for 4.0.
It was also something briefly considered for 3.0, but since the prebuilt extension system was still new at the time it was better to keep both system for the 3.0 release.
The text was updated successfully, but these errors were encountered: