Type stubs for `shinywidgets` are missing from `typeshed.en.json`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- build-system, developer-experience
Research direction
Start with scripts/create_typeshed.py, especially PACKAGES and the pyright.run("--createstub", "shinywidgets", ...) call, then run make all to reproduce the unresolved-import errors. Check which shinywidgets runtime dependencies are missing from the venv. Done means typeshed.en.json contains shinywidgets entries and the typeshed generation completes successfully.
Written by the indexing model from the issue text.
Description
Summary
During make all, scripts/create_typeshed.py reports:
Import 'shinywidgets' not found
Import 'shinywidgets' could not be resolved
Error occurred when creating type stub: Import 'shinywidgets' could not be resolved
…and the resulting build/shinylive/pyright/typeshed.en.json contains zero entries for shinywidgets, while it has full coverage for shiny, htmltools, and shinyswatch.
Confirmed pre-existing
This is not a regression introduced by any specific submodule bump. Comparing local v0.10.10 build vs. the live v0.10.9 typeshed:
| build | shiny entries | htmltools entries | shinywidgets entries |
|---|---|---|---|
| PROD v0.10.9 (live typeshed) | 188 | 7 | 0 |
| LOCAL v0.10.10 | 188 | 7 | 0 |
Impact
- Runtime: unaffected —
shinywidgets-X.Y.Z-py3-none-any.whlis still bundled into pyodide and apps usingshinywidgetscontinue to work. - Editor: the in-browser pyright integration has no hover/intellisense/type-checking for
import shinywidgetssymbols.
Likely cause
pyright --createstub shinywidgets requires the package's transitive imports to resolve (e.g. anywidget, ipywidgets, …). The create_typeshed.py venv probably doesn't install these, so pyright bails before emitting stubs. The other three packages in PACKAGES = ("htmltools", "shiny", "shinywidgets", "shinyswatch") succeed because their dep graphs are satisfied by what's currently installed.
See scripts/create_typeshed.py:15,28-29.
Suggested fix
Ensure anywidget (and any other shinywidgets runtime deps that satisfy module resolution) are installed in the venv used by create_typeshed.py before the pyright.run("--createstub", "shinywidgets", ...) call.
- 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
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 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