sphinx-doc / sphinx-doc/sphinx

viewcode: the update of source code does not fire incremental build

Open
#8,759 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

extensions:viewcode type:bug
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
viewcode: the update of source code does not fire incremental build

To Reproduce

# index.rst
.. py:class:: Foo1
   :module: example
  1. Build HTML (make html)
  2. modify source code
  3. Build HTML

Sphinx considers nothing changed. So build is skipped.
The change of source code will not be reflected in the highlighted code.

Expected behavior
The change of source code should be reflected in the highlighted code.

Your project
No

Screenshots
No

Environment info

  • OS: Mac
  • Python version: 3.9.1
  • Sphinx version: HEAD of 3.x
  • Sphinx extensions: sphinx.ext.viewcode
  • Extra tools: No

Additional context
No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the sphinx.ext.viewcode extension and reproduce the issue using the provided index.rst example: run make html, modify the source, and run make html again. Trace how incremental builds decide whether the highlighted source changed; done means the updated source is reflected in the generated HTML.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.