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

Versioning JS #1569

Open
mlucool opened this issue Aug 3, 2017 · 6 comments
Open

Versioning JS #1569

mlucool opened this issue Aug 3, 2017 · 6 comments
Milestone

Comments

@mlucool
Copy link
Contributor

mlucool commented Aug 3, 2017

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 that moduleVersion 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.

@jasongrout jasongrout added this to the Future milestone Aug 3, 2017
@jasongrout
Copy link
Member

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.

@jasongrout
Copy link
Member

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.

@mlucool
Copy link
Contributor Author

mlucool commented Aug 4, 2017

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.

@jasongrout
Copy link
Member

I've tagged this issue with the Future milestone for consideration in the future. Thanks again!

@Madhu94
Copy link
Contributor

Madhu94 commented Feb 9, 2018

@jasongrout #1892 would solve this issue ?

@jasongrout
Copy link
Member

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.

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

No branches or pull requests

3 participants