-
Notifications
You must be signed in to change notification settings - Fork 947
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
Versioning JS #1569
Comments
It's a bit tricky because requirejs is the system the notebook uses, and it doesn't really have the concept of version numbers of different libraries. In JupyterLab, the module version is respected - but there still is a complication there in that you'd have to bundle up all the versions of your code into one extension to register with the widget manager, or name the extensions in a way that encodes the version number as part of the extension name. |
That said, the WidgetManager could make a convention about where to install different versions of the code. I like your proposal, for example. I think the next step would be to make a PR so that we have a specific design and implementation to discuss and iterate on. |
Thanks for the comments. I won't have time to work on a PR here as I am still using the 5.x branch of widgets. If this could be added to the roadmap though, that would be helpful. |
I've tagged this issue with the Future milestone for consideration in the future. Thanks again! |
@jasongrout #1892 would solve this issue ? |
No, but it might help a little. Again, like you said, the fundamental problem here is that the notebook widget manager ignores the version information, and even if it didn't, we don't have a clean way to install multiple versions of the same extension. |
I am running in an environment where I would like to switch kernels which may have different versions of ipywidget code and therefore require different versions of JS. Ideally, I'd like the python widget to find the best JS via semver, but exact version will be more than sufficient.
It seems like I should use
_view_module_version
from this #1313 (ref: #1242), but it appears thatmoduleVersion
is ignored in WidgetManager and instead only used in the embedded case. I would have expected that WidgetManager would allow me to do something like:/path/to/custom/extensions/my-extension/1.2.3
. To be clearer,my-extension
would only have folders where each folder is named the same as the version and would be everything that would typically go in a top level extension today (e.g.extension.js
) and nothing else (specially no knowledge of any of the versions).Please let me know if you need more details.
The text was updated successfully, but these errors were encountered: