{"action":"created","issue":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/1190","repository_url":"https://api.github.com/repos/jupyterlab/jupyterlab","labels_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/1190/labels{/name}","comments_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/1190/comments","events_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/1190/events","html_url":"https://github.com/jupyterlab/jupyterlab/pull/1190","id":186528849,"number":1190,"title":"Add version compatibility checks for extensions","user":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"labels":[{"id":392845633,"url":"https://api.github.com/repos/jupyterlab/jupyterlab/labels/component:Build%20System","name":"component:Build System","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"assignees":[{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/milestones/1","html_url":"https://github.com/jupyterlab/jupyterlab/milestones/Beta","labels_url":"https://api.github.com/repos/jupyterlab/jupyterlab/milestones/1/labels","id":1866462,"number":1,"title":"Beta","description":"A version of JupyterLab that is reasonably feature-complete and stable enough to be usable for day-to-day work. Targeted to early adopters and advanced users who are willing to put up with some rough edges and a few missing features and small regressions.\r\n\r\nAfter we reach this milestone, the project enters beta status. We'll continue to release `0.x.x` versions until we've satisfied the [Milestone 1.0](https://github.com/jupyter/jupyterlab/milestones/2) criteria.","creator":{"login":"fperez","id":57394,"avatar_url":"https://avatars.githubusercontent.com/u/57394?v=3","gravatar_id":"","url":"https://api.github.com/users/fperez","html_url":"https://github.com/fperez","followers_url":"https://api.github.com/users/fperez/followers","following_url":"https://api.github.com/users/fperez/following{/other_user}","gists_url":"https://api.github.com/users/fperez/gists{/gist_id}","starred_url":"https://api.github.com/users/fperez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fperez/subscriptions","organizations_url":"https://api.github.com/users/fperez/orgs","repos_url":"https://api.github.com/users/fperez/repos","events_url":"https://api.github.com/users/fperez/events{/privacy}","received_events_url":"https://api.github.com/users/fperez/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":321,"state":"open","created_at":"2016-07-06T00:50:01Z","updated_at":"2016-11-03T14:00:26Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-11-01T13:03:48Z","updated_at":"2016-11-03T14:48:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/pulls/1190","html_url":"https://github.com/jupyterlab/jupyterlab/pull/1190","diff_url":"https://github.com/jupyterlab/jupyterlab/pull/1190.diff","patch_url":"https://github.com/jupyterlab/jupyterlab/pull/1190.patch"},"body":"Use npm semver to check for lab extension validity.\r\n\r\nAdds version compatibility to lab extension validation and does not attempt to load invalid entries.\r\n\r\nAlso fixes our Python version to be in sync with npm (it was just `None`) before, and allows `jupyter lab --version` to print the appropriate version.\r\n\r\nThis will only work for plugins created using `@jupyterlab/extension-builder` 0.8.1 or newer, since we were previously not adding the required dependencies metadata for each module in the manifest.\r\n\r\n```\r\njupyter labextension list\r\nKnown labextensions:\r\nconfig dir: /Users/ssilvester/.jupyter/labconfig\r\n    jupyterlab_geojson  enabled\r\n    - Validating...\r\n     OK has entry point?\r\n     OK has necessary files?\r\n      X is version compatible?\r\n```\r\n\r\ncf #1011."},"comment":{"url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/comments/258163894","html_url":"https://github.com/jupyterlab/jupyterlab/pull/1190#issuecomment-258163894","issue_url":"https://api.github.com/repos/jupyterlab/jupyterlab/issues/1190","id":258163894,"user":{"login":"jasongrout","id":192614,"avatar_url":"https://avatars.githubusercontent.com/u/192614?v=3","gravatar_id":"","url":"https://api.github.com/users/jasongrout","html_url":"https://github.com/jasongrout","followers_url":"https://api.github.com/users/jasongrout/followers","following_url":"https://api.github.com/users/jasongrout/following{/other_user}","gists_url":"https://api.github.com/users/jasongrout/gists{/gist_id}","starred_url":"https://api.github.com/users/jasongrout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasongrout/subscriptions","organizations_url":"https://api.github.com/users/jasongrout/orgs","repos_url":"https://api.github.com/users/jasongrout/repos","events_url":"https://api.github.com/users/jasongrout/events{/privacy}","received_events_url":"https://api.github.com/users/jasongrout/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T14:48:23Z","updated_at":"2016-11-03T14:48:23Z","body":"The algorithm here won't quite work. For example, using the extension builder 0.8.1 to build jupyterlab_geojson generates this in the manifest:\r\n\r\n```\r\n        \"modules\": {\r\n                \"jupyterlab_geojson@0.1.1/lib/plugin.js\": [\r\n                        \"jupyterlab@^0.7.0/lib/docregistry/index.js\",\r\n                        \"jupyterlab_geojson@0.1.1/lib/widget.js\",\r\n                        \"leaflet@^1.0.1/dist/leaflet.css\"\r\n                ],\r\n                \"jupyterlab@0.7.0/lib/docregistry/index.js\": [\r\n                        \"jupyterlab@0.7.0/lib/docregistry/context.js\",\r\n                        \"jupyterlab@0.7.0/lib/docregistry/default.js\",\r\n                        \"jupyterlab@0.7.0/lib/docregistry/kernelactions.js\",\r\n                        \"jupyterlab@0.7.0/lib/docregistry/kernelselector.js\",\r\n                        \"jupyterlab@0.7.0/lib/docregistry/registry.js\"\r\n                ],\r\n```\r\n\r\nNow, this extension should be good with jlab `0.7.1`, even if it includes `0.7.0`. But when the algorithm hits the list of dependencies for the jlab module, it will try to see if `0.7.1` satisfies the semver range `0.7.0`.\r\n\r\nSome options:\r\n1. Ignore any mods that were `jupyterlab`, knowing that the semver range of those dependencies is restricted to that specific version.\r\n2. Add a separate `engine` attribute to the manifest saying what semver range of jlab is appropriate, pulled straight from the package.json. This would require a change to the extension builder, of course.\r\n3. Look at the manifest's `entry` attribute to see what mods to check, and ignore the others. (I think this option is not good by itself, because it doesn't check dependency's versions of jlab, but it might be helpful to flag to the user if a dependency actually depends on a different version of jlab)\r\n\r\nBut even all of these, while improvements on the status quo, don't address the real problem of modules provided in a package shadowing the system version. For example, suppose my plugin packages jlab 0.7.1 modules, but I'm trying to run it on 0.7.0. The semver cache will still serve 0.7.1 modules to everyone from my extension."}}
{"actor":{"display_login":"jasongrout"}}