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

Python wheel package fails to build due to webpack dependency (jupyter) #2530

Closed
elukey opened this issue Nov 12, 2023 · 2 comments
Closed

Comments

@elukey
Copy link
Contributor

elukey commented Nov 12, 2023

Problem: Building the Python wheel fails due to a webpack dependency on jupyter.
catboost version: HEAD
Operating System: Debian Bookworm
CPU: Intel i7

UserWarning: ValueError: Extensions require a devDependency on @jupyterlab/builder@^4.0.7, you have a dependency on 3.0.6
  warnings.warn(msg[-1].strip())

The following diff fixes the problem:

--- a/catboost/python-package/catboost/widget/js/package.json
+++ b/catboost/python-package/catboost/widget/js/package.json
@@ -21,7 +21,7 @@
     "plotly.js-dist-min": "^1.58.4"
   },
   "devDependencies": {
-    "@jupyterlab/builder": "^3.0.6",
+    "@jupyterlab/builder": "^4.0.7",
     "css-loader": "^5.2.0",
     "rimraf": "^3.0.2",
     "style-loader": "^2.0.0",
@andrey-khropov
Copy link
Member

The following diff fixes the problem:

--- a/catboost/python-package/catboost/widget/js/package.json
+++ b/catboost/python-package/catboost/widget/js/package.json
@@ -21,7 +21,7 @@
     "plotly.js-dist-min": "^1.58.4"
   },
   "devDependencies": {
-    "@jupyterlab/builder": "^3.0.6",
+    "@jupyterlab/builder": "^4.0.7",
     "css-loader": "^5.2.0",
     "rimraf": "^3.0.2",
     "style-loader": "^2.0.0",

Unfortunately it is not as simple as that because it switches the build-time dependency from jupyterlab 3.x to jupyterlab 4.x and it can be problematic for compatibility because jupyterlab 4.x introduced changes that are not backwards - compatible with jupyterlab 3.x:

  • CatBoost widget has not been checked under jupyterlab 4.x. I've created Visualization widget compatibility with JupyterLab 4.x #2533 for that.
  • CatBoost widget built with jupyterlab/builder 4.x will possibly won't work with jupyterlab 3.x (and jupyterlab 3.x is still supported and widely used so we shouldn't drop its support immediately). This has to be checked as well and widget code adapted to be compatible with both jupyterlab 3.x and jupyterlab 4.x and possibly two versions of the widget to be released in the future.

In commit 76ed5da I've changed jupyterlab version specification in dependencies to make clear that only jupyterlab 3.x versions are supported for now.

@elukey
Copy link
Contributor Author

elukey commented Nov 17, 2023

@andrey-khropov nice thanks for the explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants