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

Upgrade to jupyterlite-xeus 3 #219

Closed
anutosh491 opened this issue Jan 15, 2025 · 3 comments · Fixed by #221
Closed

Upgrade to jupyterlite-xeus 3 #219

anutosh491 opened this issue Jan 15, 2025 · 3 comments · Fixed by #221
Labels
enhancement New feature or request

Comments

@anutosh491
Copy link
Collaborator

anutosh491 commented Jan 15, 2025

The deploy build for xeus-cpp-lite (on both xeus-cpp & cppinterop) were failing yesterday as there as pointed out by @mcbarton on discord. This is because there was a release on jupyterlite-xeus yesterday.

The improvements that have been worked on

  1. Jupyterlite-xeus 3 depends on mambajs that basically helps Installing conda packages into a browser. So basically we need this if we plan on supporting numcpp, xtensor, clad or anything in the browser.

  2. There won't be a need to copy stuff as we are doing currently

cp $PREFIX/bin/xcpp.data _output/extensions/@jupyterlite/xeus/static
cp $PREFIX/lib/libclangCppInterOp.so _output/extensions/@jupyterlite/xeus/static

Prs were made to handle the .data and the .so file

For reference
i) This PR by me handles the .data file
jupyterlite/xeus#145
ii) This PR by Martin Renou (a maintainer) handles the .so file
jupyterlite/xeus#146

So a simple jupyterlite build and jupyterlite serve would be enough here.

@github-actions github-actions bot added the Needs triage Used in auto labelling of new issues label Jan 15, 2025
@anutosh491
Copy link
Collaborator Author

anutosh491 commented Jan 15, 2025

How do we go about the upgrade.

  1. We need a way to include missing Emscripten APIs. Otherwise we would encounter issues like this (TypeError while running xeus-cpp with jupyterlite-xeus 3.0.0a2 jupyterlite/xeus#141)

Currently the best way to fix this is through a post.js file like done in xeus-r (jupyter-xeus/xeus-r#113) untill we have a way to shift this change in xeus-lite so that all kernels automatically including this change.

  1. After the update, as the shared object file would now be automatically picked up, we need to let jupyterlite-xeus know what shared object file would xeus-cpp-lite depend on. Hence we need to update our kernel.json something like this (Specify needed shared libs in kernel spec jupyter-xeus/xeus-r#114)

So we would need something like the following in our kernel.json !

    "shared": {
      "libclangCppInterOp.so": "lib/libclangCppInterOp.so"
    }
    

This also gives me a reason to maybe split out the kernel.json to build a separate thing for the wasm build and for the non-wasm build as I've pointed out here (#185)

@anutosh491 anutosh491 added enhancement New feature or request and removed Needs triage Used in auto labelling of new issues labels Jan 15, 2025
@anutosh491
Copy link
Collaborator Author

First PR for solving this is up (#220)

@anutosh491
Copy link
Collaborator Author

Second Pr that should fix this issue is now raised #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant