sphinx-doc / sphinx-doc/sphinx

Regression with Sphinx 8 and symlinks: `document isn't included in any toctree [toc.not_included]`

Open
#14,520 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

internals:toctree type:bug
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.

Image
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.