Skip to content

fix(build): remove wheels that pyodide-lock.json does not list - #275

Draft
schloerke wants to merge 2 commits into
schloerke/test-server-per-workerfrom
schloerke/prune-unlisted-wheels
Draft

schloerke wants to merge 2 commits into
schloerke/test-server-per-workerfrom
schloerke/prune-unlisted-wheels

Conversation

@schloerke

@schloerke schloerke commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on posit-dev/shinylive#274.

build/shinylive/pyodide/ kept every wheel it ever held, and all of them went out in _shinylive/ and in the dist tarball:

  • older versions of PyPI packages from earlier lock files (plotnine 0.15.8 next to 0.15.9)
  • Pyodide's own copies of packages that shinylive_lock.json replaces (altair 6.0.0, about 780 KB)
  • the wheels Pyodide ships for its own test suite (pytest, coverage, test_*)

update_pyodide_lock_json now deletes any wheel that the final pyodide-lock.json does not list, along with its .whl.metadata file. Only .whl files are touched, so python_stdlib.zip and the shared-library .zip packages stay.

Known limit: once Pyodide's copy of a replaced package is deleted, it is gone. If that package is later dropped from shinylive_requirements.json, unpack Pyodide again with rm -rf build/shinylive/pyodide && make all.

build/shinylive/pyodide/ kept every wheel it ever held: older versions of PyPI packages from earlier lock files (plotnine 0.15.8 next to 0.15.9), Pyodide's own copies of packages shinylive_lock.json replaces (altair 6.0.0), and the wheels Pyodide ships for its own test suite. All of them went out in _shinylive/ and in the dist tarball.

update_pyodide_lock_json now deletes any wheel, and its .metadata file, that the final pyodide-lock.json does not list.
@schloerke
schloerke added this pull request to stack #264 November 10, 2026 19:06
@schloerke schloerke changed the title schloerke/prune unlisted wheels fix(build): remove wheels that pyodide-lock.json does not list Nov 10, 2026
@schloerke
schloerke marked this pull request as draft November 10, 2026 19:06
@github-actions

Copy link
Copy Markdown
Contributor

Unit tests only — the pure-logic modules in src/. The React components, hooks, engine proxies and service worker are covered by the pytest + Playwright suites in tests/, which are not measured here.

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 100% 1994/1994
🟢 Branches 100% 400/400
🟢 Functions 100% 96/96
🟢 Lines 100% 1994/1994

Test suite run success

342 tests passing in 20 suites.

Report generated by 🧪jest coverage report action from 46be45b

This branch has not been deployed

No deployments
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.

1 participant