Rebuild only the necessary ReST files.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, python
- Domain
- build-system, documentation
Research direction
Start by locating the callback hooked to env-before-read-docs and the directive-processing code. Read Sphinx's BuildEnvironment.note_dependency documentation and trace how relevant source files are available there. Done means incremental builds rebuild only reStructuredText documents dependent on changed JavaScript sources, rather than all found documents.
Written by the indexing model from the issue text.
Description
Currently sphinx_js basically rebuilds the documentation every time as it hooks on env-before-read-docs and expands docs to process to all found_docs[0]. The docstring of the callback specifically notes that this is done "because we have no way of telling which ones reference JS code that might have changed".
Turns out, as I somehow managed to find out for an other project Sphinx actually has the tools for that: BuildEnvironment.note_dependency.
Just invoke it with the relevant source file(s) during directive processing and it will add the source file as a dependency of the current rST document, and will remember that during the next (incremental) build.
[0] incidentally a simpler version might have been to hook onto env-get-outdated and return found_docs, anything returned by the env-get-outdated handler is considered a changed file.
- Dominant language
- Python
- Stars
- 290
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 pyodide/sphinx-js
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
All issues in pyodide/sphinx-js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100