sphinx-doc / sphinx-doc/sphinx
Regression with Sphinx 8 and symlinks: `document isn't included in any toctree [toc.not_included]`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Problem
Within doc/index.rst, we are including a doc/README.rst file, which is actually a symlink to the same file in the root directory of the repository. This layout works well until Sphinx 7, but starts failing on Sphinx 8 when running with -W.
/path/to/doc/README.rst: WARNING: document isn't included in any toctree [toc.not_included]
Demo project
We've created a minimal project to demonstrate the problem. On its CI run #28813477292, you can observe the outcome.
References
How to Reproduce
Prepare
git clone https://github.com/tech-writing/sphinx-symlink-regression.git
cd sphinx-symlink-regression
Sphinx 7 works
uv run --with='sphinx==7.*' sh -c 'cd doc; make html'; echo $?
Sphinx 8 fails
uv run --with='sphinx==8.*' sh -c 'cd doc; make html'; echo $?
Contributor guide
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.
Research direction
Clone the linked sphinx-symlink-regression project and reproduce the difference with the documented Sphinx 7 and Sphinx 8 commands. Inspect doc/index.rst and the symlinked doc/README.rst, then trace Sphinx's handling of the included document and toctree warning. Done means the Sphinx 8 build no longer reports toc.not_included under -W while the documented layout continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100