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

Link pyodide build into dashboard/public #58547

Draft
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

snickell
Copy link
Contributor

@snickell snickell commented May 11, 2024

Makes pyodide available on the /pyodide studio URL in both local dev mode and in non-local dev mode (e.g. prod).

This PR:

  1. Modifies rake package:apps:symlink (called as part of rake install) to install a symlink from dashboard/public/pyodide (available on the studio URL /pyodide) to either apps/build/package (local dev) or dashboard/public/apps-package (non-local dev).
  2. Directs pyiodideWebWorker to loadPyodide() wasm and whl files from the local server at URL /pyodide/{version}

Why? Pyodide build is available in two different local paths depending on whether we're in local dev mode or not:

  1. When locals.yml has: use_my_apps: true (i.e. we're in local apps dev mode), we have webpack configured (using @pyodide/pyodide-webpack-plugin) to build pyodide into apps/build/package/js/pyodide. This is uploaded to S3 as part of staging & test builds as an apps-package tarball.
  2. When using use_my_apps: false, we use the apps-package from S3, which has the pyodide build available in dashboard/public/apps-package/js/pyodide

Can test using: http://localhost-studio.code.org:3000//s/allthethings/lessons/50/levels/1

An alternative approach to the problem is here: #58547

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

Successfully merging this pull request may close these issues.

None yet

1 participant