build: pip installs into venv/ make `make all` rebuild the local wheels
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- build-system
Research direction
Start by reading the Makefile rules for the local wheels and the comment above the packages target; reproduce the issue with make -n -W venv/bin update_packages_lock_local. Update the prerequisite handling and comment based on the issue’s proposed fix, then check that the dry run no longer schedules unnecessary wheel rebuilds and that the documented make all behavior is accurate.
Written by the indexing model from the issue text.
Description
Problem
The rules that build the local wheels in packages/ list $(PYBIN) (venv/bin, a directory) as a normal prerequisite:
$(PACKAGE_DIR)/$(HTMLTOOLS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-htmltools
$(PACKAGE_DIR)/$(SHINY_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shiny
$(PACKAGE_DIR)/$(SHINYWIDGETS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-shinywidgets
$(PACKAGE_DIR)/$(FAICONS_WHEEL): $(PYBIN) $(PACKAGE_DIR)/py-faicons
$(PACKAGE_DIR)/$(LIBSASS_WHEEL): $(PYBIN)
Any pip install that adds a file to venv/bin changes that folder's timestamp. That includes make test-deps, the first make test-scripts, and pip install -e packages/py-shiny. After that, the next make all deletes every local wheel and rebuilds it from whatever state the submodules are in, and downloads libsass again. An editable install also writes into packages/py-*, which triggers the same rebuild.
So local changes in a submodule can end up in the wheels that ship, without anyone asking for a rebuild.
This happens on main today through retrieve_packages → build/shinylive/pyodide/<wheel> → packages/<wheel>. update_packages_lock_local now also depends on the wheels, which adds a second path to the same rebuild.
The comment above the packages target is also out of date. It says the wheels "must be run manually after updating the package submodules; it will not run automatically with make all". make all does rebuild them.
How to see it
make -n -W venv/bin update_packages_lock_local
This prints rm -f ./packages/htmltools*.whl and pip wheel ... for every local package.
Possible fix
- Make the venv an order-only prerequisite, so it must exist but its timestamp does not matter. For example:
$(PACKAGE_DIR)/$(SHINY_WHEEL): $(PACKAGE_DIR)/py-shiny | $(PYBIN), and$(PACKAGE_DIR)/$(LIBSASS_WHEEL): | $(PYBIN). - Decide whether a change to the
packages/py-*folders should still trigger a rebuild. A folder's timestamp changes only when entries are added or removed at its top level, so it is a weak signal either way. - Rewrite the comment above
packages:so it says whatmake alldoes.
- Dominant language
- TypeScript
- Stars
- 253
- Forks
- 25
- Avg merge
- 6d 22h
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/shinylive
-
dependencies enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 40/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
posit-dev/shinylive#221 · 8 comments · 2 reactions ·
Maintainers usually reply within 1 day
All issues in posit-dev/shinylive
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Vessel9817/onion-site-template#512 ·
Maintainers usually reply within 1 day
-
nightly-tests
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
BlackBeltTechnology/pi-agent-dashboard#1256 ·
Maintainers usually reply within 1 day
-
approved
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
fritzprix/libr-agent#3266 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
better-auth/better-auth#13101 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day